We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8a60171 commit c6c9997Copy full SHA for c6c9997
1 file changed
Scripts/Form.cs
@@ -130,13 +130,27 @@ public string ToJSON()
130
131
}
132
133
+ public string ToJSON<T>() where T : class, new()
134
+ {
135
+
136
+ return JsonConvert.SerializeObject(GetFormValues<T>());
137
138
+ }
139
140
public void LoadFromJSON(string json)
141
{
142
143
LoadFormRawValues(JsonConvert.DeserializeObject<Dictionary<string, object>>(json));
144
145
146
147
+ public void LoadFromJSON<T>(string json)
148
149
150
+ LoadFormValues(JsonConvert.DeserializeObject<T>(json));
151
152
153
154
public void LoadFormRawValues(Dictionary<string, object> values)
155
156
0 commit comments