JsonExtensions (FSharp.Data)
Get all the elements of a JSON value.
Returns an empty array if the value is not a JSON array.
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)
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)
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)
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)
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)
Get a number as a float (assuming that the value is convertible to a float)
-
x
:
JsonValue -
?cultureInfo
:
CultureInfo -
?missingValues
:
string[]
-
Returns:
float
Get a number as an integer (assuming that the value fits in integer)
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)
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
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)
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)
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
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
Try to get the value at the specified index, if the value is a JSON array.
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
Assuming the value is an object, get value with the specified name
-
x
:
JsonValue -
propertyName
:
string
-
Returns:
JsonValue