public interface JsonObjectOrArray
JsonObject and
JsonArray.| Modifier and Type | Method and Description |
|---|---|
JsonObjectOrArray |
clear()
Clears all elements.
|
JsonObjectOrArray |
clone(boolean mutable)
Clone the object.
|
BigDecimal |
getArrayFirstBigDecimal(String jsonPath)
Gets the first value (as BigDecimal) of a
JsonArray property
of the object, using the JsonPath to find the array. |
BigDecimal |
getArrayFirstBigDecimal(String jsonPath,
BigDecimal defaultElement)
Gets the first value (as BigDecimal) of a
JsonArray property
of the object, using the JsonPath to find the array. |
Boolean |
getArrayFirstBoolean(String jsonPath)
Gets the first value (as Boolean) of a
JsonArray property
of the object, using the JsonPath to find the array. |
Boolean |
getArrayFirstBoolean(String jsonPath,
Boolean defaultElement)
Gets the first value (as Boolean) of a
JsonArray property
of the object, using the JsonPath to find the array. |
byte[] |
getArrayFirstBytesFromBase64String(String jsonPath)
Gets the first value (as byte[]) of a
JsonArray property
of the object, using the JsonPath to find the array. |
byte[] |
getArrayFirstBytesFromBase64String(String jsonPath,
byte[] defaultElement)
Gets the first value (as byte[]) of a
JsonArray property
of the object, using the JsonPath to find the array. |
Date |
getArrayFirstDate(String jsonPath)
Gets the first value (as Date) of a
JsonArray property
of the object, using the JsonPath to find the array. |
Date |
getArrayFirstDate(String jsonPath,
Date defaultElement)
Gets the first value (as Date) of a
JsonArray property
of the object, using the JsonPath to find the array. |
Double |
getArrayFirstDouble(String jsonPath)
Gets the first value (as Double) of a
JsonArray property
of the object, using the JsonPath to find the array. |
Double |
getArrayFirstDouble(String jsonPath,
Double defaultElement)
Gets the first value (as Double) of a
JsonArray property
of the object, using the JsonPath to find the array. |
Float |
getArrayFirstFloat(String jsonPath)
Gets the first value (as Float) of a
JsonArray property
of the object, using the JsonPath to find the array. |
Float |
getArrayFirstFloat(String jsonPath,
Float defaultElement)
Gets the first value (as Float) of a
JsonArray property
of the object, using the JsonPath to find the array. |
Integer |
getArrayFirstInteger(String jsonPath)
Gets the first value (as Integer) of a
JsonArray property
of the object, using the JsonPath to find the array. |
Integer |
getArrayFirstInteger(String jsonPath,
Integer defaultElement)
Gets the first value (as Integer) of a
JsonArray property
of the object, using the JsonPath to find the array. |
JsonArray |
getArrayFirstJsonArray(String jsonPath)
Gets the first value (as JsonArray) of a
JsonArray property
of the object, using the JsonPath to find the array. |
JsonArray |
getArrayFirstJsonArray(String jsonPath,
JsonArray defaultElement)
Gets the first value (as JsonArray) of a
JsonArray property
of the object, using the JsonPath to find the array. |
JsonObject |
getArrayFirstJsonObject(String jsonPath)
Gets the first value (as JsonObject) of a
JsonArray property
of the object, using the JsonPath to find the array. |
JsonObject |
getArrayFirstJsonObject(String jsonPath,
JsonObject defaultElement)
Gets the first value (as JsonObject) of a
JsonArray property
of the object, using the JsonPath to find the array. |
Long |
getArrayFirstLong(String jsonPath)
Gets the first value (as Long) of a
JsonArray property
of the object, using the JsonPath to find the array. |
Long |
getArrayFirstLong(String jsonPath,
Long defaultElement)
Gets the first value (as Long) of a
JsonArray property
of the object, using the JsonPath to find the array. |
String |
getArrayFirstString(String jsonPath)
Gets the first value (as String) of a
JsonArray property
of the object, using the JsonPath to find the array. |
String |
getArrayFirstString(String jsonPath,
String defaultElement)
Gets the first value (as String) of a
JsonArray property
of the object, using the JsonPath to find the array. |
BigDecimal |
getBigDecimal(String jsonPath)
Gets an element as
BigDecimal using the
specified JsonPath. |
BigDecimal |
getBigDecimal(String jsonPath,
BigDecimal defaultElement)
Gets an element as
BigDecimal using the
specified JsonPath. |
Boolean |
getBoolean(String jsonPath)
Gets an element as
Boolean using the
specified JsonPath. |
Boolean |
getBoolean(String jsonPath,
Boolean defaultElement)
Gets an element as
Boolean using the
specified JsonPath. |
byte[] |
getBytesFromBase64String(String jsonPath)
Gets a byte array, from a base 64 encoded element using the
specified
JsonPath. |
byte[] |
getBytesFromBase64String(String jsonPath,
byte[] defaultElement)
Gets a byte array, from a base 64 encoded element using the
specified
JsonPath. |
Date |
getDate(String jsonPath)
Gets a UTC timezoned date from a
ISO 8601 date element using the
specified JsonPath. |
Date |
getDate(String jsonPath,
Date defaultElement)
Gets a UTC timezoned date from a
ISO 8601 date element using the
specified JsonPath. |
Double |
getDouble(String jsonPath)
Gets an element as
Double using the
specified JsonPath. |
Double |
getDouble(String jsonPath,
Double defaultElement)
Gets an element as
Double using the
specified JsonPath. |
Float |
getFloat(String jsonPath)
Gets an element as
Float using the
specified JsonPath. |
Float |
getFloat(String jsonPath,
Float defaultElement)
Gets an element as
Float using the
specified JsonPath. |
Integer |
getInteger(String jsonPath)
Gets an element as
Integer using the
specified JsonPath. |
Integer |
getInteger(String jsonPath,
Integer defaultElement)
Gets an element as
Integer using the
specified JsonPath. |
JsonArray |
getJsonArray(String jsonPath)
Gets an element as
JsonArray using the
specified JsonPath. |
JsonArray |
getJsonArray(String jsonPath,
JsonArray defaultElement)
Gets an element as
JsonArray using the
specified JsonPath. |
JsonArray |
getJsonArrayOrEmpty(String jsonPath)
Gets an element as
JsonArray using the
specified JsonPath. |
JsonObject |
getJsonObject(String jsonPath)
Gets an element as
JsonObject using the
specified JsonPath. |
JsonObject |
getJsonObject(String jsonPath,
JsonObject defaultElement)
Gets an element as
JsonObject using the
specified JsonPath. |
JsonObject |
getJsonObjectOrEmpty(String jsonPath)
Gets an element as
JsonObject using the
specified JsonPath. |
Long |
getLong(String jsonPath)
Gets an element as
Long using the
specified JsonPath. |
Long |
getLong(String jsonPath,
Long defaultElement)
Gets an element as
Long using the
specified JsonPath. |
Object |
getObject(String jsonPath)
Gets an untyped Object using the
specified
JsonPath. |
Object |
getObject(String jsonPath,
Object defaultElement)
Gets an untyped Object using the
specified
JsonPath. |
String |
getString(String jsonPath)
Gets an element as
String using the
specified JsonPath. |
String |
getString(String jsonPath,
String defaultElement)
Gets an element as
String using the
specified JsonPath. |
boolean |
isCanBeConvertedToBigDecimal(String jsonPath)
Validates that the value at the specified
JsonPath exists and
is currently null, of type BigDecimal, or can be
converted and retrieved as one. |
boolean |
isCanBeConvertedToBoolean(String jsonPath)
Validates that the value at the specified
JsonPath exists and
is currently null, of type Boolean, or can be
converted and retrieved as one. |
boolean |
isCanBeConvertedToByteArray(String jsonPath)
Validates that the value at the specified
JsonPath exists and
is currently null, of type base 64 String representing
a byte array, or can be converted and retrieved as one. |
boolean |
isCanBeConvertedToDate(String jsonPath)
Validates that the value at the specified
JsonPath exists and
is currently null, of type Date, or can be
converted and retrieved as one. |
boolean |
isCanBeConvertedToDouble(String jsonPath)
Validates that the value at the specified
JsonPath exists and
is currently null, of type Double, or can be
converted and retrieved as one. |
boolean |
isCanBeConvertedToFloat(String jsonPath)
Validates that the value at the specified
JsonPath exists and
is currently null, of type Float, or can be
converted and retrieved as one. |
boolean |
isCanBeConvertedToInteger(String jsonPath)
Validates that the value at the specified
JsonPath exists and
is currently null, of type Integer, or can be
converted and retrieved as one. |
boolean |
isCanBeConvertedToJsonArray(String jsonPath)
Validates that the value at the specified
JsonPath exists and
is currently null, of type JsonArray, or can be
converted and retrieved as one. |
boolean |
isCanBeConvertedToJsonObject(String jsonPath)
Validates that the value at the specified
JsonPath exists and
is currently null, of type JsonObject, or can be
converted and retrieved as one. |
boolean |
isCanBeConvertedToLong(String jsonPath)
Validates that the value at the specified
JsonPath exists and
is currently null, of type Long, or can be
converted and retrieved as one. |
boolean |
isCanBeConvertedToString(String jsonPath)
Validates that the value at the specified
JsonPath exists and
is currently null, of type String, or can be
converted and retrieved as one. |
boolean |
isElementExists(String jsonPath)
Does the object contain an element at
the
JsonPath position (even if
null)? |
boolean |
isMutable()
Is this object/array mutable?
|
boolean |
isNull(String jsonPath)
Validates that the value at the specified
JsonPath exists and
is null. |
boolean |
isOfTypeBigDecimal(String jsonPath)
Validates that the value at the specified
JsonPath exists and
is currently null or of type BigDecimal, without requiring
any conversion. |
boolean |
isOfTypeBoolean(String jsonPath)
Validates that the value at the specified
JsonPath exists and
is currently null or of type Boolean, without requiring
any conversion. |
boolean |
isOfTypeByteArray(String jsonPath,
boolean acceptBase64StringToo)
Validates that the value at the specified
JsonPath exists and
is currently null or of type byte[], without requiring
any conversion. |
boolean |
isOfTypeDate(String jsonPath)
Validates that the value at the specified
JsonPath exists and
is currently null or of type Date, without requiring
any conversion. |
boolean |
isOfTypeDouble(String jsonPath)
Validates that the value at the specified
JsonPath exists and
is currently null or of type Double, without requiring
any conversion. |
boolean |
isOfTypeFloat(String jsonPath)
Validates that the value at the specified
JsonPath exists and
is currently null or of type Float, without requiring
any conversion. |
boolean |
isOfTypeInteger(String jsonPath)
Validates that the value at the specified
JsonPath exists and
is currently null or of type Integer, without requiring
any conversion. |
boolean |
isOfTypeJsonArray(String jsonPath)
Validates that the value at the specified
JsonPath exists and
is currently null or of type JsonArray, without requiring
any conversion. |
boolean |
isOfTypeJsonObject(String jsonPath)
Validates that the value at the specified
JsonPath exists and
is currently null or of type JsonObject, without requiring
any conversion. |
boolean |
isOfTypeLong(String jsonPath)
Validates that the value at the specified
JsonPath exists and
is currently null or of type Long, without requiring
any conversion. |
boolean |
isOfTypeString(String jsonPath)
Validates that the value at the specified
JsonPath exists and
is currently null or of type String, without requiring
any conversion. |
JsonObjectOrArray |
put(String jsonPath,
Object element)
Puts an element at the specified
JsonPath. |
JsonObjectOrArray |
put(String jsonPath,
Object element,
boolean clone)
Puts an element at the specified
JsonPath. |
JsonObjectOrArray |
remove(String jsonPath)
Removes an element at
JsonPath. |
int |
size()
The size of the object.
|
String |
toJsonString()
The
Json string representation
of the object. |
String |
toJsonString(boolean pretty)
The
Json string representation
of the object. |
void |
transform(String jsonPath,
ElementTransformer transformer)
Transforms the element at the specified
JsonPath using
the transformer. |
void |
transformAll(ElementTransformer transformer)
Transforms all the elements of the object, using the specified
transformer.
|
void |
transformAll(ElementTransformer transformer,
boolean recursive)
Transforms all the elements of the object, using the specified
transformer.
|
void |
trim(String jsonPath)
Trims the element at the specified
JsonPath if
it's of type String. |
void |
trimAll()
Trims all the elements of the object that are of type
String. |
void |
trimAll(boolean recursive)
Trims all the elements of the object that are of type
String.
|
JsonObjectValidationSet |
validationSet()
Creates a new, empty validation set, for that
JsonObject. |
void transform(String jsonPath, ElementTransformer transformer)
JsonPath using
the transformer.JsonObjectValidationSet validationSet()
JsonObject.boolean isMutable()
JsonObjectOrArray clear()
int size()
String toJsonString()
Json string representation
of the object.String toJsonString(boolean pretty)
Json string representation
of the object.pretty - if true, the generated String will
be formatted.JsonObjectOrArray clone(boolean mutable)
mutable - if false, the resulting
object will be immutable.void transformAll(ElementTransformer transformer)
void transformAll(ElementTransformer transformer, boolean recursive)
recursive - if true,
then all children elements will also be transformed,
recursively.void trim(String jsonPath)
JsonPath if
it's of type String.void trimAll()
String. This transformation is not recursive.void trimAll(boolean recursive)
recursive - if true,
then all children elements will also be trimmed,
recursively.boolean isElementExists(String jsonPath)
JsonPath position (even if
null)?JsonObjectOrArray remove(String jsonPath)
JsonPath.JsonObjectOrArray put(String jsonPath, Object element)
JsonPath.
Overwrites any existing element at that JsonPath.
The required hierarchy will be created, if required, to
support the JsonPath.
If the object to add is not of a JsonObject's native type, the object is converted to a JsonObject or a JsonArray before being added. Once the object is converted and added, a modification to the original object won't affect the added element, and vice-versa.
If the element to add is a JsonObject or
a JsonArray and is immutable then
it will be cloned.
Doing so, we can make sure that the current object is always
fully mutable or fully immutable.
If the element implements ToJsonObjectConvertible, it
will be converted to a JsonObject using the associated
conversion method. If it implements ToJsonArrayConvertible, it
will be converted to a JsonArray using the associated
conversion method.
Those are the types of object that will be converted to a JsonArray instead of a JsonObject, if no conversion interface is implemented :
JsonObjectOrArray put(String jsonPath, Object element, boolean clone)
JsonPath.
Overwrites any existing element at that JsonPath.
The required hierarchy will be created, if required, to
support the JsonPath.
If the object to add is not of a JsonObject's native type, the object is converted to a JsonObject or a JsonArray before being added. Once the object is converted and added, a modification to the original object won't affect the added element, and vice-versa.
If the element to add is a JsonObject or
a JsonArray and is immutable then
it will be cloned.
Doing so, we can make sure that the current object is always
fully mutable or fully immutable.
If the element implements ToJsonObjectConvertible, it
will be converted to a JsonObject using the associated
conversion method. If it implements ToJsonArrayConvertible, it
will be converted to a JsonArray using the associated
conversion method.
Those are the types of object that will be converted to a JsonArray instead of a JsonObject, if no conversion interface is implemented :
clone - if true, and the element to add is a
JsonObject or JsonArray, a clone will be made
before being added. If that case, any modification to the
original element won't affect the added one,
and vice-versa. If the element is immutable then it will
always be cloned. Doing so, we can make sure the current object is always
fully mutable or fully immutable.JsonObject getJsonObject(String jsonPath) throws CantConvertException
JsonObject using the
specified JsonPath.null if not found.CantConvertException - if an existing element can't be converted to the
required type.JsonObject getJsonObject(String jsonPath, JsonObject defaultElement) throws CantConvertException
JsonObject using the
specified JsonPath.defaultElement if not found.CantConvertException - if an existing element can't be converted to the
required type.JsonObject getJsonObjectOrEmpty(String jsonPath) throws CantConvertException
JsonObject using the
specified JsonPath.JsonObject if not found or if null.CantConvertException - if an existing element can't be converted to the
required type.JsonArray getJsonArray(String jsonPath) throws CantConvertException
JsonArray using the
specified JsonPath.null if not found.CantConvertException - if an existing element can't be converted to the
required type.JsonArray getJsonArray(String jsonPath, JsonArray defaultElement) throws CantConvertException
JsonArray using the
specified JsonPath.defaultElement if not found.CantConvertException - if an existing element can't be converted to the
required type.JsonArray getJsonArrayOrEmpty(String jsonPath) throws CantConvertException
JsonArray using the
specified JsonPath.JsonArray if not found or if null.CantConvertException - if an existing element can't be converted to the
required type.String getString(String jsonPath)
String using the
specified JsonPath.null if not found.String getString(String jsonPath, String defaultElement)
String using the
specified JsonPath.defaultElement if not found.Integer getInteger(String jsonPath) throws CantConvertException
Integer using the
specified JsonPath.null if not found.CantConvertException - if an existing element can't be converted to the
required type.Integer getInteger(String jsonPath, Integer defaultElement) throws CantConvertException
Integer using the
specified JsonPath.defaultElement if not found.CantConvertException - if an existing element can't be converted to the
required type.Long getLong(String jsonPath) throws CantConvertException
Long using the
specified JsonPath.null if not found.CantConvertException - if an existing element can't be converted to the
required type.Long getLong(String jsonPath, Long defaultElement) throws CantConvertException
Long using the
specified JsonPath.defaultElement if not found.CantConvertException - if an existing element can't be converted to the
required type.Float getFloat(String jsonPath) throws CantConvertException
Float using the
specified JsonPath.null if not found.CantConvertException - if an existing element can't be converted to the
required type.Float getFloat(String jsonPath, Float defaultElement) throws CantConvertException
Float using the
specified JsonPath.defaultElement if not found.CantConvertException - if an existing element can't be converted to the
required type.Double getDouble(String jsonPath) throws CantConvertException
Double using the
specified JsonPath.null if not found.CantConvertException - if an existing element can't be converted to the
required type.Double getDouble(String jsonPath, Double defaultElement) throws CantConvertException
Double using the
specified JsonPath.defaultElement if not found.CantConvertException - if an existing element can't be converted to the
required type.Boolean getBoolean(String jsonPath) throws CantConvertException
Boolean using the
specified JsonPath.null if not found.CantConvertException - if an existing element can't be converted to the
required type.Boolean getBoolean(String jsonPath, Boolean defaultElement) throws CantConvertException
Boolean using the
specified JsonPath.defaultElement if not found.CantConvertException - if an existing element can't be converted to the
required type.BigDecimal getBigDecimal(String jsonPath) throws CantConvertException
BigDecimal using the
specified JsonPath.null if not found.CantConvertException - if an existing element can't be converted to the
required type.BigDecimal getBigDecimal(String jsonPath, BigDecimal defaultElement) throws CantConvertException
BigDecimal using the
specified JsonPath.defaultElement if not found.CantConvertException - if an existing element can't be converted to the
required type.byte[] getBytesFromBase64String(String jsonPath) throws CantConvertException
JsonPath.null if not found.CantConvertException - if an existing element can't be converted to the
required type.byte[] getBytesFromBase64String(String jsonPath, byte[] defaultElement) throws CantConvertException
JsonPath.defaultElement if not found.CantConvertException - if an existing element can't be converted to the
required type.Date getDate(String jsonPath) throws CantConvertException
ISO 8601 date element using the
specified JsonPath.null if not found.CantConvertException - if an existing element can't be converted to the
required type.Date getDate(String jsonPath, Date defaultElement) throws CantConvertException
ISO 8601 date element using the
specified JsonPath.defaultElement if not found.CantConvertException - if an existing element can't be converted to the
required type.Object getObject(String jsonPath)
JsonPath.null if not found. This object
will necessarily be of a type managed by JsonObjectOrArray, since
an object of any other type is automatically converted when added.Object getObject(String jsonPath, Object defaultElement)
JsonPath.defaultElement if not found. This object
will necessarily be of a type managed by JsonObjectOrArray, since
an object of any other type is automatically converted when added.JsonObject getArrayFirstJsonObject(String jsonPath) throws CantConvertException
JsonArray property
of the object, using the JsonPath to find the array.null if the array or
the first element are not found.CantConvertException - if an existing element can't be converted to the
required type.JsonObject getArrayFirstJsonObject(String jsonPath, JsonObject defaultElement) throws CantConvertException
JsonArray property
of the object, using the JsonPath to find the array.defaultElement if the array or
the first element are not found.CantConvertException - if an existing element can't be converted to the
required type.JsonArray getArrayFirstJsonArray(String jsonPath) throws CantConvertException
JsonArray property
of the object, using the JsonPath to find the array.null if the array or
the first element are not found.CantConvertException - if an existing element can't be converted to the
required type.JsonArray getArrayFirstJsonArray(String jsonPath, JsonArray defaultElement) throws CantConvertException
JsonArray property
of the object, using the JsonPath to find the array.defaultElement if the array or
the first element are not found.CantConvertException - if an existing element can't be converted to the
required type.String getArrayFirstString(String jsonPath)
JsonArray property
of the object, using the JsonPath to find the array.null if the array or
the first element are not found.String getArrayFirstString(String jsonPath, String defaultElement)
JsonArray property
of the object, using the JsonPath to find the array.defaultElement if the array or
the first element are not found.Integer getArrayFirstInteger(String jsonPath) throws CantConvertException
JsonArray property
of the object, using the JsonPath to find the array.null if the array or
the first element are not found.CantConvertException - if an existing element can't be converted to the
required type.Integer getArrayFirstInteger(String jsonPath, Integer defaultElement) throws CantConvertException
JsonArray property
of the object, using the JsonPath to find the array.defaultElement if the array or
the first element are not found.CantConvertException - if an existing element can't be converted to the
required type.Long getArrayFirstLong(String jsonPath) throws CantConvertException
JsonArray property
of the object, using the JsonPath to find the array.null if the array or
the first element are not found.CantConvertException - if an existing element can't be converted to the
required type.Long getArrayFirstLong(String jsonPath, Long defaultElement) throws CantConvertException
JsonArray property
of the object, using the JsonPath to find the array.defaultElement if the array or
the first element are not found.CantConvertException - if an existing element can't be converted to the
required type.Double getArrayFirstDouble(String jsonPath) throws CantConvertException
JsonArray property
of the object, using the JsonPath to find the array.null if the array or
the first element are not found.CantConvertException - if an existing element can't be converted to the
required type.Double getArrayFirstDouble(String jsonPath, Double defaultElement) throws CantConvertException
JsonArray property
of the object, using the JsonPath to find the array.defaultElement if the array or
the first element are not found.CantConvertException - if an existing element can't be converted to the
required type.Float getArrayFirstFloat(String jsonPath) throws CantConvertException
JsonArray property
of the object, using the JsonPath to find the array.null if the array or
the first element are not found.CantConvertException - if an existing element can't be converted to the
required type.Float getArrayFirstFloat(String jsonPath, Float defaultElement) throws CantConvertException
JsonArray property
of the object, using the JsonPath to find the array.defaultElement if the array or
the first element are not found.CantConvertException - if an existing element can't be converted to the
required type.Boolean getArrayFirstBoolean(String jsonPath) throws CantConvertException
JsonArray property
of the object, using the JsonPath to find the array.null if the array or
the first element are not found.CantConvertException - if an existing element can't be converted to the
required type.Boolean getArrayFirstBoolean(String jsonPath, Boolean defaultElement) throws CantConvertException
JsonArray property
of the object, using the JsonPath to find the array.defaultElement if the array or
the first element are not found.CantConvertException - if an existing element can't be converted to the
required type.BigDecimal getArrayFirstBigDecimal(String jsonPath) throws CantConvertException
JsonArray property
of the object, using the JsonPath to find the array.null if the array or
the first element are not found.CantConvertException - if an existing element can't be converted to the
required type.BigDecimal getArrayFirstBigDecimal(String jsonPath, BigDecimal defaultElement) throws CantConvertException
JsonArray property
of the object, using the JsonPath to find the array.defaultElement if the array or
the first element are not found.CantConvertException - if an existing element can't be converted to the
required type.byte[] getArrayFirstBytesFromBase64String(String jsonPath) throws CantConvertException
JsonArray property
of the object, using the JsonPath to find the array.null if the array or
the first element are not found.CantConvertException - if an existing element can't be converted to the
required type.byte[] getArrayFirstBytesFromBase64String(String jsonPath, byte[] defaultElement) throws CantConvertException
JsonArray property
of the object, using the JsonPath to find the array.defaultElement if the array or
the first element are not found.CantConvertException - if an existing element can't be converted to the
required type.Date getArrayFirstDate(String jsonPath) throws CantConvertException
JsonArray property
of the object, using the JsonPath to find the array.null if the array or
the first element are not found.CantConvertException - if an existing element can't be converted to the
required type.Date getArrayFirstDate(String jsonPath, Date defaultElement) throws CantConvertException
JsonArray property
of the object, using the JsonPath to find the array.defaultElement if the array or
the first element are not found.CantConvertException - if an existing element can't be converted to the
required type.boolean isCanBeConvertedToString(String jsonPath)
JsonPath exists and
is currently null, of type String, or can be
converted and retrieved as one.boolean isCanBeConvertedToInteger(String jsonPath)
JsonPath exists and
is currently null, of type Integer, or can be
converted and retrieved as one.boolean isCanBeConvertedToLong(String jsonPath)
JsonPath exists and
is currently null, of type Long, or can be
converted and retrieved as one.boolean isCanBeConvertedToFloat(String jsonPath)
JsonPath exists and
is currently null, of type Float, or can be
converted and retrieved as one.boolean isCanBeConvertedToDouble(String jsonPath)
JsonPath exists and
is currently null, of type Double, or can be
converted and retrieved as one.boolean isCanBeConvertedToBoolean(String jsonPath)
JsonPath exists and
is currently null, of type Boolean, or can be
converted and retrieved as one.boolean isCanBeConvertedToBigDecimal(String jsonPath)
JsonPath exists and
is currently null, of type BigDecimal, or can be
converted and retrieved as one.boolean isCanBeConvertedToByteArray(String jsonPath)
JsonPath exists and
is currently null, of type base 64 String representing
a byte array, or can be converted and retrieved as one.boolean isCanBeConvertedToDate(String jsonPath)
JsonPath exists and
is currently null, of type Date, or can be
converted and retrieved as one.boolean isCanBeConvertedToJsonObject(String jsonPath)
JsonPath exists and
is currently null, of type JsonObject, or can be
converted and retrieved as one.boolean isCanBeConvertedToJsonArray(String jsonPath)
JsonPath exists and
is currently null, of type JsonArray, or can be
converted and retrieved as one.boolean isOfTypeString(String jsonPath)
JsonPath exists and
is currently null or of type String, without requiring
any conversion.boolean isOfTypeInteger(String jsonPath)
JsonPath exists and
is currently null or of type Integer, without requiring
any conversion.boolean isOfTypeLong(String jsonPath)
JsonPath exists and
is currently null or of type Long, without requiring
any conversion.boolean isOfTypeFloat(String jsonPath)
JsonPath exists and
is currently null or of type Float, without requiring
any conversion.boolean isOfTypeDouble(String jsonPath)
JsonPath exists and
is currently null or of type Double, without requiring
any conversion.boolean isOfTypeBoolean(String jsonPath)
JsonPath exists and
is currently null or of type Boolean, without requiring
any conversion.boolean isOfTypeBigDecimal(String jsonPath)
JsonPath exists and
is currently null or of type BigDecimal, without requiring
any conversion.boolean isOfTypeByteArray(String jsonPath, boolean acceptBase64StringToo)
JsonPath exists and
is currently null or of type byte[], without requiring
any conversion.acceptBase64StringToo - if true, then a valid base 64 String
will also be accepted.boolean isOfTypeDate(String jsonPath)
JsonPath exists and
is currently null or of type Date, without requiring
any conversion.boolean isOfTypeJsonObject(String jsonPath)
JsonPath exists and
is currently null or of type JsonObject, without requiring
any conversion.boolean isOfTypeJsonArray(String jsonPath)
JsonPath exists and
is currently null or of type JsonArray, without requiring
any conversion.boolean isNull(String jsonPath)
JsonPath exists and
is null.Copyright © 2016. All rights reserved.