I have a data table in my database where I store various settings. Since they are of any type (even complex object graphs) I decided to store their values as serialized JSON strings.
Let's say that I serialized a List<ItemBase>
. Serialized string looks just fine. But the problem is that list items are of various types that are inherited from ItemBase
(which may as well be abstract for what I care).
Question
Which (de)serialization class/library should I use so my JSON strings will be correctly deserialized to correct object instances.
json.net has the ability to preserve references
And it supports storing the type