If you have specific non-basic types stored as json strings, there’s an easier way:
// requires Newtonsoft.Json namespace
T yourVariable = JsonConvert.DeserializeObject(Of T)(jsonString)
T is any serializable type and
jsonString is it’s json representation, f.e.:
If one is not too familiar with json, for making complex structures you can also make a workflow that creates your object and writes the json for you.
That way you don’t need to start from scratch for complex structures but can add 2-3 variables so that a “template” representation is created and then fill out the rest.
JsonRoundTripSerializationWIthSaveToFile.xaml (5.9 KB)
Just deserialization part: