c# - A way to have static class for deserialize and serializing objects -
i wondering if me example of class can take type , serialize string json or delim string, , it's original type. config settings in text file line of values, delimiter.
for example, have object or class configurationsetting. so, when reading in line in config/text file, want serialize configurationsetting object. appreciated, , in advance! have seen json cannot find reference it, have forgotten how handled.
here example of config file:
a line form follows: zzzvisa***|publix visa main.pdf|literal|true
so not possible because not have property names values, .net know how handle it?
you use json.net serialize objects to/from json.
the basic reading , writing page in documentation shows how read , write json .net objects.
if want break delimited info, , create it, might want consider using string.split
, string.join
. these methods allow break delimited text arrays, , rejoin array delimited text.
Comments
Post a Comment