 | JObjectParse Method (String) |
Load a
JObject from a string that contains JSON.
Namespace: Newtonsoft.Json.LinqAssembly: Newtonsoft.Json (in Newtonsoft.Json.dll) Version: 10.0.0.0 (10.0.2.20802)
Syntaxpublic static JObject Parse(
string json
)
Parameters
- json
- Type: SystemString
A String that contains JSON.
Return Value
Type:
JObjectA
JObject populated from the string that contains JSON.
Exceptions
ExamplesParsing 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