Click or drag to resize
Json.NET

Convert JSON to Value

 
Sample
Usage
JValue v1 = new JValue(true);

bool b = v1.ToObject<bool>();

Console.WriteLine(b);
// true

int i = v1.ToObject<int>();

Console.WriteLine(i);
// 1

string s = v1.ToObject<string>();

Console.WriteLine(s);
// "True"