Custom Newtonsoft JSON deserialization
I have a dictionary where:
- The key will always be a string
- The value will be either:
- string
- an object of
MyClass
Normally, you would do something like:
However, this wont deserialize the non-string value into an instance of MyClass
like it normally would.
How can tell the deserializer how to deserialize a string vs an object?4 Replies
I figured it out. I have to use a JSON converter
Unknown User•10mo ago
Message Not Public
Sign In & Join Server To View
A couple reasons. Just readability and a small amount of compression. And also just because I'm awkward
Unknown User•10mo ago
Message Not Public
Sign In & Join Server To View