Closed CedricDumont closed 8 years ago
You can convert obj1 to Dictionarty<string,object> using jsonconvert.
JsonConvert.DeserializeObject<Dictionary<string, object>>("{'LastName':'Dark', 'FirstName':'Vador'}");
then you won't get this exception.
I am running into the same issue, the above work-around only seems to work if the JSON only contains top-level data (IE, no nested elements). If there is nested elements, they seem to get the JsonLinqContract, even when deserialized as a Dictionary.
It fails in the following JSON:
{
test1:
{
test1_1: "1"
},
test2:
{
test2_1: "2"
}
}
The following code
leads to
Do you have a quick Idea. is it a usage error...