Reputation: 111
The problem is that JSON is in the following format:
{"think":{"median":1.24531,"test":6.2342}}
This is how the output of the server looks like, when I try to parse it I get errors because the values aren't inside quotes.
Upvotes: 1
Views: 1725
Reputation: 116108
They are doubles and shouldn't be inside quotes. This works:
var str = @"{""think"":{""median"":1.24531,""test"":6.2342}}";
dynamic dyn = JsonConvert.DeserializeObject(str);
Console.WriteLine((double)dyn.think.median);
Upvotes: 1