Click or drag to resize
Json.NETJObjectParse Method (String)
 
Load a JObject from a string that contains JSON.

Namespace: Newtonsoft.Json.Linq
Assembly: Newtonsoft.Json (in Newtonsoft.Json.dll) Version: 10.0.0.0 (10.0.2.20802)
Syntax
C#
public static JObject Parse(
	string json
)

Parameters

json
Type: SystemString
A String that contains JSON.

Return Value

Type: JObject
A JObject populated from the string that contains JSON.
Exceptions
ExceptionCondition
JsonReaderExceptionjson is not valid JSON.
Examples
Parsing a JSON Object from Text
1string json = @"{
2  CPU: 'Intel',
3  Drives: [
4    'DVD read/writer',
5    '500 gigabyte hard drive'
6  ]
7}";
8
9JObject o = JObject.Parse(json);
See Also