I need to deserialize a complex JSON blob into standard .NET containers for use in code that is not aware of JSON. It expects things to be in standard .NET types, specifically Dictionary<string, object> or List<object> where “object” can be primitive or recurse (Dictionary or List).
I cannot use a static type to map the results and JObject/JToken don’t fit. Ideally, there would be some way (via Contracts perhaps?) to convert raw JSON into basic .NET containers.
I’ve search all over for any way to coax the JSON.NET deserializer into creating these simple types when it encounters “{}” or “[]” but with little success.
Any help appreciated!
You cannot do what I was asking. At least not as far as I can tell after MUCH research. I had to edit the source of Json.NET.