JsonStructureFacade
Assumes either JSON object or JSON array.
Attributes
- See also
- Note
-
A structure facade is created by conversion only.
- Graph
-
- Supertypes
-
trait JsonArraytrait JsonObjecttrait JsonStructuretrait JsonValueclass Objecttrait Matchableclass AnyShow all
Members list
Value members
Concrete methods
Concatenates JSON object.
Concatenates JSON object.
Attributes
- Returns
-
new JSON object
Concatenates JSON array.
Concatenates JSON array.
Attributes
- Returns
-
new JSON array
Prepends value.
Prepends value.
Attributes
- Returns
-
new JSON array
Gets value.
Gets value.
Gets value.
Value parameters
- index
-
array index
Attributes
- Throws
-
JsonArrayError
if index is out of bounds
Optionally gets value.
Optionally gets value.
Value parameters
- key
-
object key
Attributes
Gets object keys.
Gets object keys.
Attributes
Removes field.
Removes field.
Value parameters
- key
-
object key
Attributes
- Returns
-
new JSON object
Removes value at given index.
Removes value at given index.
Value parameters
- index
-
array index
Attributes
- Returns
-
new JSON array
- Throws
-
JsonArrayError
if index is out of bounds
- Note
-
Subsequent values to index are shifted left.
Gets size.
Gets size.
Attributes
Unwraps underlying JSON structure.
Unwraps underlying JSON structure.
Attributes
Adds or updates field.
Adds or updates field.
Value parameters
- key
-
object key
- value
-
new value
Attributes
- Returns
-
new JSON object
Updates value at given index.
Updates value at given index.
Value parameters
- index
-
array index
- value
-
JSON value
Attributes
- Returns
-
new JSON array
- Throws
-
JsonArrayError
if index is out of bounds
Inherited methods
Converts value.
Gets value as JsonArray
.
Gets value as JsonArray
.
Value parameters
- index
-
array index
Attributes
- Throws
-
JsonArrayError
if index is out of bounds or if value is not an array
- Inherited from:
- JsonArray
Gets value as JsonArray
.
Gets value as JsonArray
.
Value parameters
- key
-
object key
Attributes
- Throws
-
JsonObjectError
if key does not exist or if value is not an array
- Inherited from:
- JsonObject
Gets value as BigDecimal
.
Gets value as BigDecimal
.
Value parameters
- index
-
array index
Attributes
- Throws
-
JsonArrayError
if index is out of bounds or if value cannot be read as
BigDecimal
- Inherited from:
- JsonArray
Gets value as BigDecimal
.
Gets value as BigDecimal
.
Value parameters
- key
-
object key
Attributes
- Throws
-
JsonObjectError
if key does not exist or if value cannot be read as
BigDecimal
- Inherited from:
- JsonObject
Gets value as BigInt
.
Gets value as BigInt
.
Value parameters
- index
-
array index
Attributes
- Throws
-
JsonArrayError
if index is out of bounds or if value cannot be read as
BigInt
- Inherited from:
- JsonArray
Gets value as BigInt
.
Gets value as BigInt
.
Value parameters
- key
-
object key
Attributes
- Throws
-
JsonObjectError
if key does not exist or if value cannot be read as
BigInt
- Inherited from:
- JsonObject
Gets value as Boolean
.
Gets value as Boolean
.
Value parameters
- index
-
array index
Attributes
- Throws
-
JsonArrayError
if index is out of bounds or if value cannot be read as
Boolean
- Inherited from:
- JsonArray
Gets value as Boolean
.
Gets value as Boolean
.
Value parameters
- key
-
object key
Attributes
- Throws
-
JsonObjectError
if key does not exist or if value cannot be read as
Boolean
- Inherited from:
- JsonObject
Gets value as Double
.
Gets value as Double
.
Value parameters
- index
-
array index
Attributes
- Throws
-
JsonArrayError
if index is out of bounds or if value cannot be read as
Double
- Inherited from:
- JsonArray
Gets value as Double
.
Gets value as Double
.
Value parameters
- key
-
object key
Attributes
- Throws
-
JsonObjectError
if key does not exist or if value cannot be read as
Double
- Inherited from:
- JsonObject
Gets value as Float
.
Gets value as Float
.
Value parameters
- index
-
array index
Attributes
- Throws
-
JsonArrayError
if index is out of bounds or if value cannot be read as
Float
- Inherited from:
- JsonArray
Gets value as Float
.
Gets value as Float
.
Value parameters
- key
-
object key
Attributes
- Throws
-
JsonObjectError
if key does not exist or if value cannot be read as
Float
- Inherited from:
- JsonObject
Gets value as Int
.
Gets value as Int
.
Value parameters
- index
-
array index
Attributes
- Throws
-
JsonArrayError
if index is out of bounds or if value cannot be read as
Int
- Inherited from:
- JsonArray
Gets value as Int
.
Gets value as Int
.
Value parameters
- key
-
object key
Attributes
- Throws
-
JsonObjectError
if key does not exist or if value cannot be read as
Int
- Inherited from:
- JsonObject
Gets value as Long
.
Gets value as Long
.
Value parameters
- index
-
array index
Attributes
- Throws
-
JsonArrayError
if index is out of bounds or if value cannot be read as
Long
- Inherited from:
- JsonArray
Gets value as Long
.
Gets value as Long
.
Value parameters
- key
-
object key
Attributes
- Throws
-
JsonObjectError
if key does not exist or if value cannot be read as
Long
- Inherited from:
- JsonObject
Gets value as JsonObject
.
Gets value as JsonObject
.
Value parameters
- index
-
array index
Attributes
- Throws
-
JsonArrayError
if index is out of bounds or if value is not an object
- Inherited from:
- JsonArray
Gets value as JsonObject
.
Gets value as JsonObject
.
Value parameters
- key
-
object key
Attributes
- Throws
-
JsonObjectError
if key does not exist or if value is not an object
- Inherited from:
- JsonObject
Gets value or returns default.
Gets value or returns default.
Value parameters
- default
-
default value
- key
-
object key
Attributes
- Inherited from:
- JsonObject
Gets value as String
.
Gets value as String
.
Value parameters
- index
-
array index
Attributes
- Throws
-
JsonArrayError
if index is out of bounds or if value cannot be read as
String
- Inherited from:
- JsonArray
Gets value as String
.
Gets value as String
.
Value parameters
- key
-
object key
Attributes
- Throws
-
JsonObjectError
if key does not exist or if value cannot be read as
String
- Inherited from:
- JsonObject
Tests for empty.
Tests for null.
Tests for null.
Value parameters
- index
-
array index
Attributes
- Throws
-
JsonArrayError
if index is out of bounds
- Inherited from:
- JsonArray
Tests for null.
Tests for null.
Value parameters
- key
-
object key
Attributes
- Throws
-
JsonObjectError
if key does not exist
- Inherited from:
- JsonObject
Tests for non-empty.
Reads value.
Reads value.
Value parameters
- index
-
array index
Attributes
- Throws
-
JsonArrayError
if index is out of bounds or if value cannot be read as type
T
- Inherited from:
- JsonArray
Reads value.
Reads value.
Value parameters
- key
-
object key
Attributes
- Throws
-
JsonObjectError
if key does not exist or if value cannot be read as type
T
. - Inherited from:
- JsonObject
Optionally reads value.
Optionally reads value.
Value parameters
- index
-
array index
Attributes
- Throws
-
JsonArrayError
if index is out of bounds or if value cannot be read as type
T
- Note
-
The value is not read if it is null.
- Inherited from:
- JsonArray
Optionally reads value.
Optionally reads value.
Value parameters
- key
-
object key
Attributes
- Throws
-
JsonObjectError
if value cannot be read as type
T
. - Note
-
The value is not read if it is null.
- Inherited from:
- JsonObject
Reads value or returns default value.
Reads value or returns default value.
Value parameters
- default
-
default value
- index
-
array index
Attributes
- Throws
-
JsonArrayError
if index is out of bounds or if value cannot be read as type
T
- Note
-
The value is not read if it is null.
- Inherited from:
- JsonArray
Reads value or returns default value.
Reads value or returns default value.
Value parameters
- default
-
default value
- key
-
object key
Attributes
- Throws
-
JsonObjectError
if value cannot be read as type
T
. - Note
-
The value is not read if it is null.
- Inherited from:
- JsonObject
Concrete fields
Returns a string representation of the object.
Returns a string representation of the object.
The default representation is platform dependent.
Attributes
- Returns
-
a string representation of the object.