JsonExtensions (FSharp.Data)

Get all the elements of a JSON value. Returns an empty array if the value is not a JSON array.

x : JsonValue
Returns: JsonValue[]

Get the boolean value of an element (assuming that the value is a boolean)

x : JsonValue
Returns: bool

Get the datetime value of an element (assuming that the value is a string containing well-formed ISO date or MSFT JSON date)

x : JsonValue
?cultureInfo : CultureInfo
Returns: DateTime

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)

x : JsonValue
?cultureInfo : CultureInfo
Returns: DateTimeOffset

Get a number as a decimal (assuming that the value fits in decimal)

x : JsonValue
?cultureInfo : CultureInfo
Returns: decimal

Get a number as a float (assuming that the value is convertible to a float)

x : JsonValue
?cultureInfo : CultureInfo
?missingValues : string[]
Returns: float

Get the guid value of an element (assuming that the value is a guid)

x : JsonValue
Returns: Guid

Get a number as an integer (assuming that the value fits in integer)

x : JsonValue
?cultureInfo : CultureInfo
Returns: int

Get a number as a 64-bit integer (assuming that the value fits in 64-bit integer)

x : JsonValue
?cultureInfo : CultureInfo
Returns: int64

Get the string value of an element (assuming that the value is a scalar) Returns the empty string for JsonValue.Null

x : JsonValue
?cultureInfo : CultureInfo
Returns: string

Get the timespan value of an element (assuming that the value is a string containing well-formed time span)

x : JsonValue
?cultureInfo : CultureInfo
Returns: TimeSpan

Get all the elements of a JSON value (assuming that the value is an array)

x : JsonValue
Returns: IEnumerator

Get property of a JSON object. Fails if the value is not an object or if the property is not present

x : JsonValue
propertyName : string
Returns: JsonValue

Get inner text of an element

x : JsonValue
Returns: string

Try to get the value at the specified index, if the value is a JSON array.

x : JsonValue
index : int
Returns: JsonValue

Assuming the value is an object, get value with the specified name

x : JsonValue
propertyName : string
Returns: JsonValue

Get a sequence of key-value pairs representing the properties of an object

x : JsonValue
Returns: (string * JsonValue)[]

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.

x : JsonValue
propertyName : string
Returns: JsonValue option