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

Popular posts from this blog

android - Get AccessToken using signpost OAuth without opening a browser (Two legged Oauth) -

org.mockito.exceptions.misusing.InvalidUseOfMatchersException: mockito -

google shop client API returns 400 bad request error while adding an item -