Apr 26, 2013, 5:21 PM
[CLOSED] Using JSON.Serialize() and JSON.Deserialize()
Hi,
Could you give me some pointers on the proper usage of JSON serialization methods? Both Serialize and Desirialize work OK for me by default as long as I don't have a hierarchy of derived classes. However, that's where the challenges start. It seems as though JSON.Deserialize() requires a properly created list of Newtonsoft JsonConverter objects or an instance of IContractResolver in order to be able to handle inherited classes.
I've looked at the Newtonsoft documentation and examples to help me get on track at
http://james.newtonking.com/projects...meHandling.htm
http://james.newtonking.com/projects...nConverter.htm
http://james.newtonking.com/projects...ctResolver.htm
Any hint or directions would be highly appreciated. Please advise if more info is required.
Could you give me some pointers on the proper usage of JSON serialization methods? Both Serialize and Desirialize work OK for me by default as long as I don't have a hierarchy of derived classes. However, that's where the challenges start. It seems as though JSON.Deserialize() requires a properly created list of Newtonsoft JsonConverter objects or an instance of IContractResolver in order to be able to handle inherited classes.
I've looked at the Newtonsoft documentation and examples to help me get on track at
http://james.newtonking.com/projects...meHandling.htm
http://james.newtonking.com/projects...nConverter.htm
http://james.newtonking.com/projects...ctResolver.htm
Any hint or directions would be highly appreciated. Please advise if more info is required.
Last edited by Daniil; Apr 30, 2013 at 3:31 PM.
Reason: [CLOSED]