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
Normally, you would do something like:
However, this wont deserialize the non-string value into an instance of
How can tell the deserializer how to deserialize a string vs an object?
- The key will always be a string
- The value will be either:
- string
- an object of
MyClassNormally, 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?
