Click or drag to resize
Json.NET

JObjectParse Method (String)

 
Load a JObject from a string that contains JSON.

Namespace:  Newtonsoft.Json.Linq
Assembly:  Newtonsoft.Json (in Newtonsoft.Json.dll) Version: 12.0.1+509643a8952ce731e0207710c429ad6e67dc43db
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
string json = @"{
  CPU: 'Intel',
  Drives: [
    'DVD read/writer',
    '500 gigabyte hard drive'
  ]
}";

JObject o = JObject.Parse(json);
See Also