# JsonExtensions

Namespace: FSharp.Data
Attributes:
[<Extension>]

Extension methods with operations on JSON values

### Static members

 Static member Description  JsonExtensions.AsArray(x)  Signature: x:JsonValue -> JsonValue [] Attributes: [] Get all the elements of a JSON value. Returns an empty array if the value is not a JSON array.  JsonExtensions.AsBoolean(x)  Signature: x:JsonValue -> bool Attributes: [] Get the boolean value of an element (assuming that the value is a boolean)  JsonExtensions.AsDateTime(...)  Signature: (x:JsonValue * cultureInfo:CultureInfo option) -> DateTime Attributes: [] Get the datetime value of an element (assuming that the value is a string containing well-formed ISO date or MSFT JSON date)  JsonExtensions.AsDateTimeOffset(...)  Signature: (x:JsonValue * cultureInfo:CultureInfo option) -> DateTimeOffset Attributes: [] Get the datetime offset value of an element (assuming that the value is a string containing well-formed ISO date time with offset or MSFT JSON datetime with offset)  JsonExtensions.AsDecimal(x, cultureInfo)  Signature: (x:JsonValue * cultureInfo:CultureInfo option) -> decimal Attributes: [] Get a number as a decimal (assuming that the value fits in decimal)  JsonExtensions.AsFloat(...)  Signature: (x:JsonValue * cultureInfo:CultureInfo option * missingValues:string [] option) -> float Attributes: [] Get a number as a float (assuming that the value is convertible to a float)  JsonExtensions.AsGuid(x)  Signature: x:JsonValue -> Guid Attributes: [] Get the guid value of an element (assuming that the value is a guid)  JsonExtensions.AsInteger(x, cultureInfo)  Signature: (x:JsonValue * cultureInfo:CultureInfo option) -> int Attributes: [] Get a number as an integer (assuming that the value fits in integer)  JsonExtensions.AsInteger64(...)  Signature: (x:JsonValue * cultureInfo:CultureInfo option) -> int64 Attributes: [] Get a number as a 64-bit integer (assuming that the value fits in 64-bit integer)  JsonExtensions.AsString(x, cultureInfo)  Signature: (x:JsonValue * cultureInfo:CultureInfo option) -> string Attributes: [] Get the string value of an element (assuming that the value is a scalar) Returns the empty string for JsonValue.Null  JsonExtensions.AsTimeSpan(...)  Signature: (x:JsonValue * cultureInfo:CultureInfo option) -> TimeSpan Attributes: [] Get the timespan value of an element (assuming that the value is a string containing well-formed time span)  JsonExtensions.GetEnumerator(x)  Signature: x:JsonValue -> IEnumerator Attributes: [] Get all the elements of a JSON value (assuming that the value is an array)  JsonExtensions.GetProperty(...)  Signature: (x:JsonValue * propertyName:string) -> JsonValue Attributes: [] Get property of a JSON object. Fails if the value is not an object or if the property is not present  JsonExtensions.InnerText(x)  Signature: x:JsonValue -> string Attributes: [] Get inner text of an element  JsonExtensions.Item(x, index)  Signature: (x:JsonValue * index:int) -> JsonValue Attributes: [] Try to get the value at the specified index, if the value is a JSON array.  JsonExtensions.Item(x, propertyName)  Signature: (x:JsonValue * propertyName:string) -> JsonValue Attributes: [] Assuming the value is an object, get value with the specified name  JsonExtensions.Properties(x)  Signature: x:JsonValue -> (string * JsonValue) [] Attributes: [] Get a sequence of key-value pairs representing the properties of an object  JsonExtensions.TryGetProperty(...)  Signature: (x:JsonValue * propertyName:string) -> JsonValue option Attributes: [] Try to get a property of a JSON value. Returns None if the value is not an object or if the property is not present.