Method | Description | |
---|---|---|
Append ( this array, JToken value ) : Newtonsoft.Json.Linq.JArray |
Add an element to a JSON array.
|
|
AsArray ( this value ) : Newtonsoft.Json.Linq.JArray |
Convert a JSON value into an array, returning null if it's unable.
|
|
AsBool ( this value ) : bool? |
Convert a JSON value into a bool, returning null if it's unable.
|
|
AsInteger ( this value ) : int? |
Convert a JSON value into an int, returning null if it's unable.
|
|
AsNumber ( this value ) : double? |
Convert a JSON value into a double, returning null if it's unable.
|
|
AsObject ( this value ) : Newtonsoft.Json.Linq.JObject |
Convert a JSON value into an object, returning null if it's unable.
|
|
AsString ( this value ) : string |
Convert a JSON value into a string, returning null if it's unable.
|
|
Get ( this value, string name ) : JToken |
Gets a named value from an object.
|
|
GetPropertyValues ( this value ) : JToken>>.IEnumerable |
Enumerate the member name/value pairs of a JSON object.
|
|
IsNull ( this value ) : bool |
Determine if the value represents null.
|
|
Null ( ) : JToken |
Get a null JSON value (that when serialized will stay null rather than not being written out).
|
|
Set ( this obj, string name, JToken value ) : JContainer |
Set a named value on an object and return that object so multiple calls can be chained.
|
|
Set ( this obj, string name, bool value ) : JContainer |
Set a named value on an object and return that object so multiple calls can be chained.
|
|
Set ( this obj, string name, double value ) : JContainer |
Set a named value on an object and return that object so multiple calls can be chained.
|
|
Set ( this obj, string name, int value ) : JContainer |
Set a named value on an object and return that object so multiple calls can be chained.
|
|
Set ( this obj, string name, string value ) : JContainer |
Set a named value on an object and return that object so multiple calls can be chained.
|
|
TryConvert ( this value, object &propertyValue ) : bool |
Try to convert a value to a CLR object.
|
|
TrySet ( this obj, string name, object value ) : bool |
Set a named value on an object of any type. Unlike the other set overloads, this will attempt to convert arbitrary CLR values into the correct JSON types.
|
Method | Description | |
---|---|---|
NumericCanRoundtrip ( object value, |
Ensure that a numeric value can safely roundtrip as a double.
|
public static Append ( this array, JToken value ) : Newtonsoft.Json.Linq.JArray | ||
array | this | The array to add to. |
value | JToken | The element to add. |
return | Newtonsoft.Json.Linq.JArray |
public static AsArray ( this value ) : Newtonsoft.Json.Linq.JArray | ||
value | this | The value to convert. |
return | Newtonsoft.Json.Linq.JArray |
public static AsBool ( this value ) : bool? | ||
value | this | The value to convert. |
return | bool? |
public static AsInteger ( this value ) : int? | ||
value | this | The value to convert. |
return | int? |
public static AsNumber ( this value ) : double? | ||
value | this | The value to convert. |
return | double? |
public static AsObject ( this value ) : Newtonsoft.Json.Linq.JObject | ||
value | this | The value to convert. |
return | Newtonsoft.Json.Linq.JObject |
public static AsString ( this value ) : string | ||
value | this | The value to convert. |
return | string |
public static Get ( this value, string name ) : JToken | ||
value | this | /// The object to check (though the type is IJsonValue so multiple /// calls to Get can be chained together). /// |
name | string | The name of the value to lookup. |
return | JToken |
public static GetPropertyValues ( this value ) : JToken>>.IEnumerable |
||
value | this | A JSON object. |
return | JToken>>.IEnumerable |
public static IsNull ( this value ) : bool | ||
value | this | The value to check. |
return | bool |
public static Set ( this obj, string name, JToken value ) : JContainer | ||
obj | this | The object to set the value on. |
name | string | The name to set. |
value | JToken | The value to set. |
return | JContainer |
public static Set ( this obj, string name, bool value ) : JContainer | ||
obj | this | The object to set the value on. |
name | string | The name to set. |
value | bool | The value to set. |
return | JContainer |
public static Set ( this obj, string name, double value ) : JContainer | ||
obj | this | The object to set the value on. |
name | string | The name to set. |
value | double | The value to set. |
return | JContainer |
public static Set ( this obj, string name, int value ) : JContainer | ||
obj | this | The object to set the value on. |
name | string | The name to set. |
value | int | The value to set. |
return | JContainer |
public static Set ( this obj, string name, string value ) : JContainer | ||
obj | this | The object to set the value on. |
name | string | The name to set. |
value | string | The value to set. |
return | JContainer |
public static TryConvert ( this value, object &propertyValue ) : bool | ||
value | this | The value to convert. |
propertyValue | object | The converted value. |
return | bool |
public static TrySet ( this obj, string name, object value ) : bool | ||
obj | this | The object to set the value on. |
name | string | The name of the value to set. |
value | object | The value to set. |
return | bool |