I have to decode a JSON string containing another JSON string on it. Currently I'm trying to decode it into a Dictionary<string,string> using Serializator.Deserialize<Dictionary<string,string>>(value) from System.Web.Script.Serialization, but haven't succeed.
This is the string:
{
"label": "Side",
"options": [
{
"key": "left",
"value": 0
},
{
"key": "right",
"value": 1
}
]
}
And this is the format error I get from the decoder:
(System.ArgumentException HResult=0x80070057 Message=Invalid object passed in, ':' or '}' expected. (34): {"label": "Side", "options": "[{"key": "left", "value": 0},{"key":"right", "value":1}]"} Source=System.Web.Extensions) Which means he gets "[{" as a string and thus fails to convert of course...
Is there any way I can decode this specific JSON string and store it in an object? Client is very specific about this JSON format... Thanks a lot