If this is a JSON array, then prepend the given value, otherwise, return a JSON array with only the given value.
If this is a JSON array, and the element is set, then prepend the given value, otherwise, return a JSON array with only the given value.
If this is a JSON object, then prepend the given value, otherwise, return a JSON object with only the given value.
If this is a JSON object, and the association is set, then prepend the given value, otherwise, return a JSON object with only the given value.
Alias for field
.
Returns a possible JSON value after traversing through JSON object values using the given field names.
Constructor a cursor from this JSON value to track history.
Returns the possible array of this JSON value.
Returns the array of this JSON value, or the given default if this JSON value is not an array.
Returns the array of this JSON value, or the given default if this JSON value is not an array.
The default array if this JSON value is not an array.
Returns the array of this JSON value, or an empty array if this JSON value is not an array.
Run on an array or object or return the given default.
Returns the possible boolean of this JSON value.
Constructor a cursor from this JSON value (alias for unary_+
).
Perform a deep merge of this JSON value with another JSON value.
Perform a deep merge of this JSON value with another JSON value.
Objects are merged by key, values from the argument JSON take precedence over values from this JSON. Nested objects are recursed.
Null, Array, Boolean, String and Number are treated as values, and values from the argument JSON completely replace values from this JSON.
Returns the possible value for the given JSON object field.
Returns the value for the given JSON object field if this is an object with the given field, otherwise, returns the default.
Returns the value for the given JSON object field if this is an object with the given field, otherwise, returns the default..
Returns the value for the given JSON object field if this is an object with the given field, otherwise, returns an empty JSON array.
Returns the value for the given JSON object field if this is an object with the given field, otherwise, returns an empty JSON object.
Returns the value for the given JSON object field if this is an object with the given field, otherwise, returns an empty JSON.
Returns the value for the given JSON object field if this is an object with the given field, otherwise, returns a JSON boolean with the value false
.
Returns the value for the given JSON object field if this is an object with the given field, otherwise, returns a JSON null
.
Returns the value for the given JSON object field if this is an object with the given field, otherwise, returns a JSON null
..
Returns the value for the given JSON object field if this is an object with the given field, otherwise, returns a JSON boolean with the value true
.
Returns the value for the given JSON object field if this is an object with the given field, otherwise, returns a JSON number with the value 0
.
The catamorphism for the JSON value data type.
Returns true
if this is a JSON object which has the given field, false
otherwise.
Constructor a cursor from this JSON value to track history.
Return true
if this JSON value is a array.
Return true
if this JSON value is a boolean.
Return true
if this JSON value is a boolean with a value of false
, otherwise, false
.
Return true
if this JSON value is null
, otherwise, false
.
Return true
if this JSON value is a number.
Return true
if this JSON value is a object.
Return true
if this JSON value is a string.
Return true
if this JSON value is a boolean with a value of true
, otherwise, false
.
Attempts to decode this JSON value to another data type.
The name of the type of the JSON value.
Pretty-print this JSON value to a string with no spaces.
If this is a JSON boolean value, invert the true
and false
values, otherwise, leave unchanged.
Returns the possible number of this JSON value.
Returns the number of this JSON value, or the given default if this JSON value is not a number.
Returns the number of this JSON value, or the given default if this JSON value is not a number.
The default number if this JSON value is not a number.
Returns this JSON number object or the value 0
if it is not a number.
Returns the possible object of this JSON value.
Return the object keys if this JSON value is an object, otherwise, return the empty list.
Returns the object map keys of this JSON value, or the given default if this JSON value is not an object.
Returns the object map keys of this JSON value, or the given default if this JSON value is not an object.
The default object map keys if this JSON value is not an object.
Returns the object map keys of this JSON value, or the empty list if this JSON value is not an object.
Returns the object of this JSON value, or the given default if this JSON value is not a object.
Returns the object of this JSON value, or the given default if this JSON value is not a object.
The default object if this JSON value is not an object.
Returns the object of this JSON value, or the empty object if this JSON value is not an object.
Return the object values if this JSON value is an object, otherwise, return the empty list.
Returns the object map values of this JSON value, or the given default if this JSON value is not an object.
Returns the object map values of this JSON value, or the given default if this JSON value is not an object.
The default object map values if this JSON value is not an object.
Returns the object map values of this JSON value, or the empty list if this JSON value is not an object.
Pretty-print this JSON value to a string using the given pretty-printing parameters.
Pretty-print this JSON value to a string indentation of two spaces.
Pretty-print this JSON value to a string indentation of four spaces.
Returns the possible string of this JSON value.
Returns the string of this JSON value, or the given default if this JSON value is not a string.
Returns the string of this JSON value, or the given default if this JSON value is not a string.
The default string if this JSON value is not a string.
Returns the string of this JSON value, or an empty string if this JSON value is not a string.
Compute a String
representation for this JSON value.
Compute a String
representation for this JSON value.
Constructor a cursor from this JSON value (alias for cursor
).
If this is a JSON array value, run the given function on the value, otherwise, leave unchanged.
If this is a JSON number value, run the given function on the value, otherwise, leave unchanged.
If this is a JSON object value, run the given function on the value, otherwise, leave unchanged.
If this is a JSON string value, run the given function on the value, otherwise, leave unchanged.
A data type representing possible JSON values.