Class JsonArrayDefault
- All Implemented Interfaces:
Iterable<Object>,JsonArray,JsonObjectOrArray
JsonArray implementation.-
Nested Class Summary
Nested classes/interfaces inherited from class org.spincast.core.json.JsonObjectArrayBase
JsonObjectArrayBase.JsonPathCachingItem -
Field Summary
FieldsFields inherited from class org.spincast.core.json.JsonObjectArrayBase
defaultElementValidator -
Constructor Summary
ConstructorsConstructorDescriptionJsonArrayDefault(List<Object> initialElements, boolean mutable, JsonManager jsonManager, SpincastUtils spincastUtils, ObjectConverter objectConverter) ConstructorJsonArrayDefault(List<Object> initialElements, JsonManager jsonManager, SpincastUtils spincastUtils, ObjectConverter objectConverter) ConstructorJsonArrayDefault(JsonManager jsonManager, SpincastUtils spincastUtils, ObjectConverter objectConverter) Constructor -
Method Summary
Modifier and TypeMethodDescriptionInserts an object at the specified index in the array.Adds an object at the specified index.Adds an object at the end of the array.Adds an object at the end of the array.Adds all elements at the end of the array.Adds elements at the end of the array.addAll(Collection<?> values) Adds all elements at the end of the array.addAll(Collection<?> values, boolean clone) Adds all elements at the end of the array.Adds all elements at the end of the array.Adds elements at the end of the array.protected JsonArrayprotected JsonArrayclear()Clears all elements.clone(boolean mutable) Clone the object.Converts theJsonArrayto a plainList<Object>.Converts the JsonArray to aList<String>.protected <T> TgetArrayFirst(int index, boolean hasDefaultValue, T defaultValue, JsonObjectDefault.IFirstElementGetter<T> firstElementGetter) getArrayFirstBigDecimal(int index) Gets the first element (as BigDecimal) of aJsonArrayelement.getArrayFirstBigDecimal(int index, BigDecimal defaultValue) Gets the first element (as BigDecimal) of aJsonArrayelement.getArrayFirstBoolean(int index) Gets the first element (as Boolean) of aJsonArrayelement.getArrayFirstBoolean(int index, Boolean defaultValue) Gets the first element (as Boolean) of aJsonArrayelement.byte[]getArrayFirstBytesFromBase64String(int index) Gets the first element (as byte[]) of aJsonArrayelement.byte[]getArrayFirstBytesFromBase64String(int index, byte[] defaultValue) Gets the first element (as byte[]) of aJsonArrayelement.getArrayFirstDate(int index) Gets the first element (as Date) of aJsonArrayelement.getArrayFirstDate(int index, Date defaultValue) Gets the first element (as Date) of aJsonArrayelement.getArrayFirstDouble(int index) Gets the first element (as Double) of aJsonArrayelement.getArrayFirstDouble(int index, Double defaultValue) Gets the first element (as Double) of aJsonArrayelement.getArrayFirstFloat(int index) Gets the first element (as Float) of aJsonArrayelement.getArrayFirstFloat(int index, Float defaultValue) Gets the first element (as Float) of aJsonArrayelement.getArrayFirstInstant(int index) Gets the first element (as Instant) of aJsonArrayelement.getArrayFirstInstant(int index, Instant defaultValue) Gets the first element (as Instant) of aJsonArrayelement.getArrayFirstInteger(int index) Gets the first element (as Integer) of aJsonArrayelement.getArrayFirstInteger(int index, Integer defaultValue) Gets the first element (as Integer) of aJsonArrayelement.getArrayFirstJsonArray(int index) Gets the first element (as JsonArray) of aJsonArrayelement.getArrayFirstJsonArray(int index, JsonArray defaultValue) Gets the first element (as JsonArray) of aJsonArrayelement.getArrayFirstJsonObject(int index) Gets the first element (as JsonObject) of aJsonArrayelement.getArrayFirstJsonObject(int index, JsonObject defaultValue) Gets the first element (as JsonObject) of aJsonArrayelement.getArrayFirstLong(int index) Gets the first element (as Long) of aJsonArrayelement.getArrayFirstLong(int index, Long defaultValue) Gets the first element (as Long) of aJsonArrayelement.getArrayFirstString(int index) Gets the first element (as String) of aJsonArrayelement.getArrayFirstString(int index, String defaultValue) Gets the first element (as String) of aJsonArrayelement.getBigDecimal(int index) Gets an element asBigDecimal.getBigDecimal(int index, BigDecimal defaultValue) Gets an element asBigDecimal.getBoolean(int index) Gets an element asBoolean.getBoolean(int index, Boolean defaultValue) Gets an element asBoolean.byte[]getBytesFromBase64String(int index) Gets a byte array, from a base 64 encoded element.byte[]getBytesFromBase64String(int index, byte[] defaultValue) Gets a byte array, from a base 64 encoded element.getDate(int index) Gets a UTC timezoned date from aISO 8601date element.Gets a UTC timezoned date from aISO 8601date element.getDouble(int index) Gets an element asDouble.Gets an element asDouble.protected ObjectgetElement(int index) protected ObjectgetElementNoKeyParsing(String jsonPath, boolean hasDefaultValue, Object defaultValue) Gets the element at this key/index, without key parsing.getFloat(int index) Gets an element asFloat.Gets an element asFloat.getInstant(int index) Gets an Instant from aISO 8601date element.getInstant(int index, Instant defaultValue) Gets an Instant from aISO 8601date element.getInteger(int index) Gets an element asInteger.getInteger(int index, Integer defaultValue) Gets an element asInteger.getJsonArray(int index) Gets an element asJsonArray.getJsonArray(int index, JsonArray defaultValue) Gets an element asJsonArray.getJsonArrayOrEmpty(int index) Gets an element asJsonArray.getJsonObject(int index) Gets an element asJsonObject.getJsonObject(int index, JsonObject defaultValue) Gets an element asJsonObject.getJsonObjectOrEmpty(int index) Gets an element asJsonObject.getLong(int index) Gets an element asLong.Gets an element asLong.getObject(int index) Gets an element, untyped.Gets an element, untyped.getString(int index) Gets an element asString.Gets an element asString.booleanisCanBeConvertedToBigDecimal(int index) Validates that the element at the specifiedindexexists and is currentlynull, of typeBigDecimal, or can be converted and retrieved as one.booleanisCanBeConvertedToBoolean(int index) Validates that the element at the specifiedindexexists and is currentlynull, of typeBoolean, or can be converted and retrieved as one.booleanisCanBeConvertedToByteArray(int index) Validates that the element at the specifiedindexexists and is currentlynull, of typebase 64 Stringrepresenting a byte array, or can be converted and retrieved as one.booleanisCanBeConvertedToDate(int index) Validates that the element at the specifiedindexexists and is currentlynull, of typeDate, or can be converted and retrieved as one.booleanisCanBeConvertedToDouble(int index) Validates that the element at the specifiedindexexists and is currentlynull, of typeDouble, or can be converted and retrieved as one.booleanisCanBeConvertedToFloat(int index) Validates that the element at the specifiedindexexists and is currentlynull, of typeFloat, or can be converted and retrieved as one.booleanisCanBeConvertedToInteger(int index) Validates that the element at the specifiedindexexists and is currentlynull, of typeInteger, or can be converted and retrieved as one.booleanisCanBeConvertedToJsonArray(int index) Validates that the element at the specifiedindexexists and is currentlynull, of typeJsonArray, or can be converted and retrieved as one.booleanisCanBeConvertedToJsonObject(int index) Validates that the element at the specifiedindexexists and is currentlynull, of typeJsonObject, or can be converted and retrieved as one.booleanisCanBeConvertedToLong(int index) Validates that the element at the specifiedindexexists and is currentlynull, of typeLong, or can be converted and retrieved as one.booleanisCanBeConvertedToString(int index) Validates that the element at the specifiedindexexists and is currentlynull, of typeString, or can be converted and retrieved as one.booleanisElementExists(int index) Is there an element at the specified index? This returnstrueeven if the element isnull.booleanisEquivalentTo(JsonArray other) Compares the currentJsonArrayto the specified one and returnstrueif they are equivalent.booleanisNull(int index) Validates that there is an element at the specifiedindexand it isnull.booleanisOfTypeBigDecimal(int index) Validates that the element at the specifiedindexexists and is currentlynullor of typeBigDecimal, without requiring any conversion.booleanisOfTypeBoolean(int index) Validates that the element at the specifiedindexexists and is currentlynullor of typeBoolean, without requiring any conversion.booleanisOfTypeByteArray(int index, boolean acceptBase64StringToo) Validates that the element at the specifiedJsonPathexists and is currentlynullor of typebyte[], without requiring any conversion.booleanisOfTypeDate(int index) Validates that the element at the specifiedindexexists and is currentlynullor of typeDate, without requiring any conversion.booleanisOfTypeDouble(int index) Validates that the element at the specifiedindexexists and is currentlynullor of typeDouble, without requiring any conversion.booleanisOfTypeFloat(int index) Validates that the element at the specifiedindexexists and is currentlynullor of typeFloat, without requiring any conversion.booleanisOfTypeInteger(int index) Validates that the element at the specifiedindexexists and is currentlynullor of typeInteger, without requiring any conversion.booleanisOfTypeJsonArray(int index) Validates that the element at the specifiedindexexists and is currentlynullor of typeJsonArray, without requiring any conversion.booleanisOfTypeJsonObject(int index) Validates that the element at the specifiedindexexists and is currentlynullor of typeJsonObject, without requiring any conversion.booleanisOfTypeLong(int index) Validates that the element at the specifiedindexexists and is currentlynullor of typeLong, without requiring any conversion.booleanisOfTypeString(int index) Validates that the element at the specifiedindexexists and is currentlynullor of typeString, without requiring any conversion.iterator()protected JsonArrayremove(int index) Removes an element at the specified index.Removes an element atJsonPath.Sets an object at the specified index.Sets an object at the specified index.protected JsonArraysetOrAddAsIs(Integer index, Object value, boolean insert) intsize()The size of the object.voidtransform(int index, ElementTransformer transformer) Transforms the element at the given index, using the specifiedElementTransformer.voidtransformAll(ElementTransformer transformer, boolean recursive) Transforms all the elements of the object, using the specified transformer.voidtrim(int index) Trims the element, if it's of typeString.Methods inherited from class org.spincast.core.json.JsonObjectArrayBase
clone, contains, getArrayFirst, getArrayFirstBigDecimal, getArrayFirstBigDecimal, getArrayFirstBigDecimal, getArrayFirstBigDecimalNoKeyParsing, getArrayFirstBigDecimalNoKeyParsing, getArrayFirstBoolean, getArrayFirstBoolean, getArrayFirstBoolean, getArrayFirstBooleanNoKeyParsing, getArrayFirstBooleanNoKeyParsing, getArrayFirstBytesFromBase64String, getArrayFirstBytesFromBase64String, getArrayFirstBytesFromBase64String, getArrayFirstBytesFromBase64StringNoKeyParsing, getArrayFirstBytesFromBase64StringNoKeyParsing, getArrayFirstDate, getArrayFirstDate, getArrayFirstDate, getArrayFirstDateNoKeyParsing, getArrayFirstDateNoKeyParsing, getArrayFirstDouble, getArrayFirstDouble, getArrayFirstDouble, getArrayFirstDoubleNoKeyParsing, getArrayFirstDoubleNoKeyParsing, getArrayFirstFloat, getArrayFirstFloat, getArrayFirstFloat, getArrayFirstFloatNoKeyParsing, getArrayFirstFloatNoKeyParsing, getArrayFirstInstant, getArrayFirstInstant, getArrayFirstInstant, getArrayFirstInstantNoKeyParsing, getArrayFirstInstantNoKeyParsing, getArrayFirstInteger, getArrayFirstInteger, getArrayFirstInteger, getArrayFirstIntegerNoKeyParsing, getArrayFirstIntegerNoKeyParsing, getArrayFirstJsonArray, getArrayFirstJsonArray, getArrayFirstJsonArray, getArrayFirstJsonArrayNoKeyParsing, getArrayFirstJsonArrayNoKeyParsing, getArrayFirstJsonObject, getArrayFirstJsonObject, getArrayFirstJsonObject, getArrayFirstJsonObjectNoKeyParsing, getArrayFirstJsonObjectNoKeyParsing, getArrayFirstLong, getArrayFirstLong, getArrayFirstLong, getArrayFirstLongNoKeyParsing, getArrayFirstLongNoKeyParsing, getArrayFirstString, getArrayFirstString, getArrayFirstString, getArrayFirstStringNoKeyParsing, getArrayFirstStringNoKeyParsing, getBigDecimal, getBigDecimal, getBigDecimal, getBigDecimalElement, getBigDecimalFromObject, getBigDecimalNoKeyParsing, getBigDecimalNoKeyParsing, getBoolean, getBoolean, getBoolean, getBooleanElement, getBooleanFromObject, getBooleanNoKeyParsing, getBooleanNoKeyParsing, getBytesFromBase64String, getBytesFromBase64String, getBytesFromBase64String, getBytesFromBase64StringElement, getBytesFromBase64StringNoKeyParsing, getBytesFromBase64StringNoKeyParsing, getBytesFromBase64StringValueFromObject, getDate, getDate, getDate, getDateElement, getDateFromObject, getDateNoKeyParsing, getDateNoKeyParsing, getdefaultElementValidator, getDouble, getDouble, getDouble, getDoubleElement, getDoubleFromObject, getDoubleNoKeyParsing, getDoubleNoKeyParsing, getElement, getFloat, getFloat, getFloat, getFloatElement, getFloatFromObject, getFloatNoKeyParsing, getFloatNoKeyParsing, getInstant, getInstant, getInstant, getInstantElement, getInstantFromObject, getInstantNoKeyParsing, getInstantNoKeyParsing, getInteger, getInteger, getInteger, getIntegerElement, getIntegerFromObject, getIntegerNoKeyParsing, getIntegerNoKeyParsing, getJsonArray, getJsonArray, getJsonArray, getJsonArrayFromObject, getJsonArrayNoKeyParsing, getJsonArrayNoKeyParsing, getJsonArrayOrEmpty, getJsonArrayOrEmpty, getJsonArrayOrEmptyNoKeyParsing, getJsonManager, getJsonObject, getJsonObject, getJsonObject, getJsonObject, getJsonObjectFromObject, getJsonObjectNoKeyParsing, getJsonObjectNoKeyParsing, getJsonObjectOrEmpty, getJsonObjectOrEmpty, getJsonObjectOrEmptyNoKeyParsing, getJsonPathCachingMap, getLong, getLong, getLong, getLongElement, getLongFromObject, getLongNoKeyParsing, getLongNoKeyParsing, getObject, getObject, getObject, getObjectConverter, getObjectNoKeyParsing, getObjectNoKeyParsing, getSpincastUtils, getString, getString, getString, getString, getStringFromObject, getStringNoKeyParsing, getStringNoKeyParsing, getTrimTransformer, isCanBeConvertedToBigDecimal, isCanBeConvertedToBigDecimal, isCanBeConvertedToBigDecimalNoKeyParsing, isCanBeConvertedToBoolean, isCanBeConvertedToBoolean, isCanBeConvertedToBooleanNoKeyParsing, isCanBeConvertedToByteArray, isCanBeConvertedToByteArray, isCanBeConvertedToByteArrayNoKeyParsing, isCanBeConvertedToDate, isCanBeConvertedToDate, isCanBeConvertedToDateNoKeyParsing, isCanBeConvertedToDouble, isCanBeConvertedToDouble, isCanBeConvertedToDoubleNoKeyParsing, isCanBeConvertedToFloat, isCanBeConvertedToFloat, isCanBeConvertedToFloatNoKeyParsing, isCanBeConvertedToInteger, isCanBeConvertedToInteger, isCanBeConvertedToIntegerNoKeyParsing, isCanBeConvertedToJsonArray, isCanBeConvertedToJsonArray, isCanBeConvertedToJsonArrayNoKeyParsing, isCanBeConvertedToJsonObject, isCanBeConvertedToJsonObject, isCanBeConvertedToJsonObjectNoKeyParsing, isCanBeConvertedToLong, isCanBeConvertedToLong, isCanBeConvertedToLongNoKeyParsing, isCanBeConvertedToString, isCanBeConvertedToString, isCanBeConvertedToStringNoKeyParsing, isMutable, isNull, isNullNoKeyParsing, isOfTypeBigDecimal, isOfTypeBigDecimalNoKeyParsing, isOfTypeBoolean, isOfTypeBoolean, isOfTypeBooleanNoKeyParsing, isOfTypeByteArray, isOfTypeByteArray, isOfTypeByteArrayNoKeyParsing, isOfTypeDate, isOfTypeDate, isOfTypeDateNoKeyParsing, isOfTypeDouble, isOfTypeDouble, isOfTypeDoubleNoKeyParsing, isOfTypeeBigDecimal, isOfTypeFloat, isOfTypeFloat, isOfTypeFloatNoKeyParsing, isOfTypeInteger, isOfTypeInteger, isOfTypeIntegerNoKeyParsing, isOfTypeJsonArray, isOfTypeJsonArray, isOfTypeJsonArrayNoKeyParsing, isOfTypeJsonObject, isOfTypeJsonObject, isOfTypeJsonObjectNoKeyParsing, isOfTypeLong, isOfTypeLong, isOfTypeLongNoKeyParsing, isOfTypeString, isOfTypeString, isOfTypeStringNoKeyParsing, isPresent, put, set, set, setIfAbsent, setIfAbsent, toJsonString, toJsonString, toString, transform, transformAll, trim, trimAll, trimAll, validateIsNullMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliteratorMethods inherited from interface org.spincast.core.json.JsonObjectOrArray
contains, getArrayFirstBigDecimal, getArrayFirstBigDecimal, getArrayFirstBoolean, getArrayFirstBoolean, getArrayFirstBytesFromBase64String, getArrayFirstBytesFromBase64String, getArrayFirstDate, getArrayFirstDate, getArrayFirstDouble, getArrayFirstDouble, getArrayFirstFloat, getArrayFirstFloat, getArrayFirstInstant, getArrayFirstInstant, getArrayFirstInteger, getArrayFirstInteger, getArrayFirstJsonArray, getArrayFirstJsonArray, getArrayFirstJsonObject, getArrayFirstJsonObject, getArrayFirstLong, getArrayFirstLong, getArrayFirstString, getArrayFirstString, getBigDecimal, getBigDecimal, getBoolean, getBoolean, getBytesFromBase64String, getBytesFromBase64String, getDate, getDate, getDouble, getDouble, getFloat, getFloat, getInstant, getInstant, getInteger, getInteger, getJsonArray, getJsonArray, getJsonArrayOrEmpty, getJsonArrayOrEmpty, getJsonObject, getJsonObject, getJsonObjectOrEmpty, getJsonObjectOrEmpty, getLong, getLong, getObject, getObject, getString, getString, isCanBeConvertedToBigDecimal, isCanBeConvertedToBoolean, isCanBeConvertedToByteArray, isCanBeConvertedToDate, isCanBeConvertedToDouble, isCanBeConvertedToFloat, isCanBeConvertedToInteger, isCanBeConvertedToJsonArray, isCanBeConvertedToJsonObject, isCanBeConvertedToLong, isCanBeConvertedToString, isMutable, isNull, isOfTypeBigDecimal, isOfTypeBoolean, isOfTypeByteArray, isOfTypeDate, isOfTypeDouble, isOfTypeFloat, isOfTypeInteger, isOfTypeJsonArray, isOfTypeJsonObject, isOfTypeLong, isOfTypeString, isPresent, set, set, setIfAbsent, setIfAbsent, toJsonString, toJsonString, transform, transformAll, trim, trimAll, trimAll
-
Field Details
-
logger
protected static final org.slf4j.Logger logger
-
-
Constructor Details
-
JsonArrayDefault
public JsonArrayDefault(JsonManager jsonManager, SpincastUtils spincastUtils, ObjectConverter objectConverter) Constructor -
JsonArrayDefault
public JsonArrayDefault(@Nullable List<Object> initialElements, JsonManager jsonManager, SpincastUtils spincastUtils, ObjectConverter objectConverter) Constructor -
JsonArrayDefault
public JsonArrayDefault(@Nullable List<Object> initialElements, boolean mutable, JsonManager jsonManager, SpincastUtils spincastUtils, ObjectConverter objectConverter) Constructor
-
-
Method Details
-
getElements
-
getElement
-
add
Description copied from interface:JsonArrayAdds an object at the end of the array.If the object to add is not of a native type, then the object is converted before being added. Once the object is converted and added, a modification of the original object won't affect this element, and vice-versa.
If the element to add is a
JsonObjector aJsonArrayand is immutable, it will be cloned. Doing so, we can make sure theJsonArrayis always fully mutable or fully immutable.If the element implements
ToJsonObjectConvertible, it will be converted to aJsonObjectusing the associated conversion method. If it implementsToJsonArrayConvertible, it will be converted to anJsonArrayusing the associated conversion method.Those are the types of objects that will be converted to a
JsonArrayinstead of aJsonObject, if no conversion interface is implemented :- A Collection
- An array
-
add
Description copied from interface:JsonArrayInserts an object at the specified index in the array. Any existing elements starting at this index are pushed to the right.If the specified index is greater than the current end of the array,
nullelements are added to fill up positionss up to the specified index!Use
setinstead if you want to replace the element at the specified index.If the object to add is not of a native type, then the object is converted before being added. Once the object is converted and added, a modification of the original object won't affect this element, and vice-versa.
If the element to add is a
JsonObjector aJsonArrayand is immutable, it will be cloned. Doing so, we can make sure theJsonArrayis always fully mutable or fully immutable.If the element implements
ToJsonObjectConvertible, it will be converted to aJsonObjectusing the associated conversion method. If it implementsToJsonArrayConvertible, it will be converted to anJsonArrayusing the associated conversion method.Those are the types of objects that will be converted to a
JsonArrayinstead of aJsonObject, if no conversion interface is implemented :- A Collection
- An array
-
add
Description copied from interface:JsonArrayAdds an object at the end of the array.If the object to add is not of a native type, then the object is converted before being added. Once the object is converted and added, a modification of the original object won't affect this element, and vice-versa.
If the element to add is a
JsonObjector aJsonArrayand is immutable, it will be cloned. Doing so, we can make sure theJsonArrayis always fully mutable or fully immutable.If the element implements
ToJsonObjectConvertible, it will be converted to aJsonObjectusing the associated conversion method. If it implementsToJsonArrayConvertible, it will be converted to anJsonArrayusing the associated conversion method.Those are the types of objects that will be converted to a
JsonArrayinstead of aJsonObject, if no conversion interface is implemented :- A Collection
- An array
- Specified by:
addin interfaceJsonArrayclone- iftrue, and the element to add is aJsonObjectorJsonArray, 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 aJsonArrayis always fully mutable or fully immutable.
-
add
Description copied from interface:JsonArrayAdds an object at the specified index.Any existing elements starting at this index are pushed to the right.
If the specified index is greater than the current end of the array,
nullelements are added to fill positions up to the specified index!Use
setinstead if you want to replace the element at the specified index.If the object to add is not of a native type, then the object is converted before being added. Once the object is converted and added, a modification of the original object won't affect this element, and vice-versa.
If the element to add is a
JsonObjector aJsonArrayand is immutable, it will be cloned. Doing so, we can make sure theJsonArrayis always fully mutable or fully immutable.If the element implements
ToJsonObjectConvertible, it will be converted to aJsonObjectusing the associated conversion method. If it implementsToJsonArrayConvertible, it will be converted to anJsonArrayusing the associated conversion method.Those are the types of objects that will be converted to a
JsonArrayinstead of aJsonObject, if no conversion interface is implemented :- A Collection
- An array
- Specified by:
addin interfaceJsonArrayclone- iftrue, and the element to add is aJsonObjectorJsonArray, 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 aJsonArrayis always fully mutable or fully immutable.
-
addAll
Description copied from interface:JsonArrayAdds all elements at the end of the array.If an element to add is not of a native type, then the element is converted before being added. Once the element is converted and added, a modification of the original object won't affect this element, and vice-versa.
If an element to add is a
JsonObjector aJsonArrayand is immutable, it will be cloned. Doing so, we can make sure theJsonArrayis always fully mutable or fully immutable.If the element implements
ToJsonObjectConvertible, it will be converted to aJsonObjectusing the associated conversion method. If it implementsToJsonArrayConvertible, it will be converted to anJsonArrayusing the associated conversion method.Those are the types of objects that will be converted to a
JsonArrayinstead of aJsonObject, if no conversion interface is implemented :- A Collection
- An array
-
addAll
Description copied from interface:JsonArrayAdds all elements at the end of the array.If an element to add is not of a native type, then the element is converted before being added. Once the element is converted and added, a modification of the original object won't affect this element, and vice-versa.
If an element to add is a
JsonObjector aJsonArrayand is immutable, it will be cloned. Doing so, we can make sure theJsonArrayis always fully mutable or fully immutable.If the element implements
ToJsonObjectConvertible, it will be converted to aJsonObjectusing the associated conversion method. If it implementsToJsonArrayConvertible, it will be converted to anJsonArrayusing the associated conversion method.Those are the types of objects that will be converted to a
JsonArrayinstead of aJsonObject, if no conversion interface is implemented :- A Collection
- An array
- Specified by:
addAllin interfaceJsonArrayclone- iftrue, and the element to add is aJsonObjectorJsonArray, 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 aJsonArrayis always fully mutable or fully immutable.
-
addAll
Description copied from interface:JsonArrayAdds all elements at the end of the array.If an element to add is not of a native type, then the element is converted before being added. Once the element is converted and added, a modification of the original object won't affect this element, and vice-versa.
If an element to add is a
JsonObjector aJsonArrayand is immutable, it will be cloned. Doing so, we can make sure theJsonArrayis always fully mutable or fully immutable.If the element implements
ToJsonObjectConvertible, it will be converted to aJsonObjectusing the associated conversion method. If it implementsToJsonArrayConvertible, it will be converted to anJsonArrayusing the associated conversion method.Those are the types of objects that will be converted to a
JsonArrayinstead of aJsonObject, if no conversion interface is implemented :- A Collection
- An array
-
addAll
Description copied from interface:JsonArrayAdds elements at the end of the array.If an element to add is not of a native type, then the element is converted before being added. Once the element is converted and added, a modification of the original object won't affect this element, and vice-versa.
If an element to add is a
JsonObjector aJsonArrayand is immutable, it will be cloned. Doing so, we can make sure theJsonArrayis always fully mutable or fully immutable.If the element implements
ToJsonObjectConvertible, it will be converted to aJsonObjectusing the associated conversion method. If it implementsToJsonArrayConvertible, it will be converted to anJsonArrayusing the associated conversion method.Those are the types of objects that will be converted to a
JsonArrayinstead of aJsonObject, if no conversion interface is implemented :- A Collection
- An array
- Specified by:
addAllin interfaceJsonArrayclone- iftrue, and the element to add is aJsonObjectorJsonArray, 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 aJsonArrayis always fully mutable or fully immutable.
-
addAll
Description copied from interface:JsonArrayAdds all elements at the end of the array.If an element to add is not of a native type, then the element is converted before being added. Once the element is converted and added, a modification of the original object won't affect this element, and vice-versa.
If an element to add is a
JsonObjector aJsonArrayand is immutable, it will be cloned. Doing so, we can make sure theJsonArrayis always fully mutable or fully immutable.If the element implements
ToJsonObjectConvertible, it will be converted to aJsonObjectusing the associated conversion method. If it implementsToJsonArrayConvertible, it will be converted to anJsonArrayusing the associated conversion method.Those are the types of objects that will be converted to a
JsonArrayinstead of aJsonObject, if no conversion interface is implemented :- A Collection
- An array
-
addAll
Description copied from interface:JsonArrayAdds elements at the end of the array.If an element to add is not of a native type, then the element is converted before being added. Once the element is converted and added, a modification of the original object won't affect this element, and vice-versa.
If an element to add is a
JsonObjector aJsonArrayand is immutable, it will be cloned. Doing so, we can make sure theJsonArrayis always fully mutable or fully immutable.If the element implements
ToJsonObjectConvertible, it will be converted to aJsonObjectusing the associated conversion method. If it implementsToJsonArrayConvertible, it will be converted to anJsonArrayusing the associated conversion method.Those are the types of objects that will be converted to a
JsonArrayinstead of aJsonObject, if no conversion interface is implemented :- A Collection
- An array
- Specified by:
addAllin interfaceJsonArrayclone- iftrue, and the element to add is aJsonObjectorJsonArray, 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 aJsonArrayis always fully mutable or fully immutable.
-
set
Description copied from interface:JsonArraySets an object at the specified index. If there is an element at this index, it is overwritten.If the specified index is greater than the current end of the array,
nullelements are added to fill positions up to the specified index.Use
addinstead if you want to insert the element at the specified index without overwritting any existing element.If an element to add is not of a native type, then the element is converted before being added. Once the element is converted and added, a modification of the original object won't affect this element, and vice-versa.
If an element to add is a
JsonObjector aJsonArrayand is immutable, it will be cloned. Doing so, we can make sure theJsonArrayis always fully mutable or fully immutable.If the element implements
ToJsonObjectConvertible, it will be converted to aJsonObjectusing the associated conversion method. If it implementsToJsonArrayConvertible, it will be converted to anJsonArrayusing the associated conversion method.Those are the types of objects that will be converted to a
JsonArrayinstead of aJsonObject, if no conversion interface is implemented :- A Collection
- An array
-
set
Description copied from interface:JsonArraySets an object at the specified index. If there is an element at this index, it is overwritten.If the specified index is greater than the current end of the array,
nullelements are added to fill positions up to the specified index.Use
addinstead if you want to insert the element at the specified index without overwritting any existing element.If an element to add is not of a native type, then the element is converted before being added. Once the element is converted and added, a modification of the original object won't affect this element, and vice-versa.
If an element to add is a
JsonObjector aJsonArrayand is immutable, it will be cloned. Doing so, we can make sure theJsonArrayis always fully mutable or fully immutable.If the element implements
ToJsonObjectConvertible, it will be converted to aJsonObjectusing the associated conversion method. If it implementsToJsonArrayConvertible, it will be converted to anJsonArrayusing the associated conversion method.Those are the types of objects that will be converted to a
JsonArrayinstead of aJsonObject, if no conversion interface is implemented :- A Collection
- An array
- Specified by:
setin interfaceJsonArrayclone- iftrue, and the element to add is aJsonObjectorJsonArray, 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 aJsonArrayis always fully mutable or fully immutable.
-
setOrAdd
-
addAsIs
-
addAsIs
-
setOrAddAsIs
-
remove
Description copied from interface:JsonObjectOrArrayRemoves an element atJsonPath.- Specified by:
removein interfaceJsonObjectOrArray- Returns:
- the current object (fluent style).
-
remove
Description copied from interface:JsonArrayRemoves an element at the specified index. Any elements to the right are shift to the left. If the index is invalid, nothing is done. -
clear
Description copied from interface:JsonObjectOrArrayClears all elements.- Specified by:
clearin interfaceJsonObjectOrArray
-
size
public int size()Description copied from interface:JsonObjectOrArrayThe size of the object.- Specified by:
sizein interfaceJsonObjectOrArray
-
isElementExists
public boolean isElementExists(int index) Description copied from interface:JsonArrayIs there an element at the specified index? This returnstrueeven if the element isnull.This is a synonym of
index >= 0 && index < size()- Specified by:
isElementExistsin interfaceJsonArray
-
iterator
-
convertToStringList
Description copied from interface:JsonArrayConverts the JsonArray to aList<String>. To do so, thetoString()method will be called on any non null element.This list is always a new instance and is mutable.
- Specified by:
convertToStringListin interfaceJsonArray
-
getJsonObject
Description copied from interface:JsonArrayGets an element asJsonObject.- Specified by:
getJsonObjectin interfaceJsonArray- Returns:
- the element or
nullif not found.
-
getJsonObject
Description copied from interface:JsonArrayGets an element asJsonObject.- Specified by:
getJsonObjectin interfaceJsonArray- Returns:
- the element or the specified
defaultValueif not found.
-
getJsonObjectOrEmpty
Description copied from interface:JsonArrayGets an element asJsonObject.- Specified by:
getJsonObjectOrEmptyin interfaceJsonArray- Returns:
- the element or an empty
JsonObjectif not found or ifnull.
-
getJsonArray
Description copied from interface:JsonArrayGets an element asJsonArray.- Specified by:
getJsonArrayin interfaceJsonArray- Returns:
- the element or
nullif not found.
-
getJsonArray
Description copied from interface:JsonArrayGets an element asJsonArray.- Specified by:
getJsonArrayin interfaceJsonArray- Returns:
- the element or the specified
defaultValueif not found.
-
getJsonArrayOrEmpty
Description copied from interface:JsonArrayGets an element asJsonArray.- Specified by:
getJsonArrayOrEmptyin interfaceJsonArray- Returns:
- the element or an empty
JsonArrayif not found or ifnull.
-
getString
Description copied from interface:JsonArrayGets an element asString. -
getString
Description copied from interface:JsonArrayGets an element asString. -
getInteger
Description copied from interface:JsonArrayGets an element asInteger.- Specified by:
getIntegerin interfaceJsonArray- Returns:
- the element or
nullif not found.
-
getInteger
Description copied from interface:JsonArrayGets an element asInteger.- Specified by:
getIntegerin interfaceJsonArray- Returns:
- the element or the specified
defaultValueif not found.
-
getLong
Description copied from interface:JsonArrayGets an element asLong. -
getLong
Description copied from interface:JsonArrayGets an element asLong. -
getDouble
Description copied from interface:JsonArrayGets an element asDouble. -
getDouble
Description copied from interface:JsonArrayGets an element asDouble. -
getFloat
Description copied from interface:JsonArrayGets an element asFloat. -
getFloat
Description copied from interface:JsonArrayGets an element asFloat. -
getBoolean
Description copied from interface:JsonArrayGets an element asBoolean.- Specified by:
getBooleanin interfaceJsonArray- Returns:
- the element or
nullif not found.
-
getBoolean
Description copied from interface:JsonArrayGets an element asBoolean.- Specified by:
getBooleanin interfaceJsonArray- Returns:
- the element or the specified
defaultValueif not found.
-
getBigDecimal
Description copied from interface:JsonArrayGets an element asBigDecimal.- Specified by:
getBigDecimalin interfaceJsonArray- Returns:
- the element or
nullif not found.
-
getBigDecimal
Description copied from interface:JsonArrayGets an element asBigDecimal.- Specified by:
getBigDecimalin interfaceJsonArray- Returns:
- the element or the specified
defaultValueif not found.
-
getBytesFromBase64String
public byte[] getBytesFromBase64String(int index) Description copied from interface:JsonArrayGets a byte array, from a base 64 encoded element.- Specified by:
getBytesFromBase64Stringin interfaceJsonArray- Returns:
- the element or
nullif not found.
-
getBytesFromBase64String
public byte[] getBytesFromBase64String(int index, byte[] defaultValue) Description copied from interface:JsonArrayGets a byte array, from a base 64 encoded element.- Specified by:
getBytesFromBase64Stringin interfaceJsonArray- Returns:
- the element or the specified
defaultValueif not found.
-
getDate
Description copied from interface:JsonArrayGets a UTC timezoned date from aISO 8601date element. -
getDate
Description copied from interface:JsonArrayGets a UTC timezoned date from aISO 8601date element. -
getInstant
Description copied from interface:JsonArrayGets an Instant from aISO 8601date element.- Specified by:
getInstantin interfaceJsonArray- Returns:
- the element or
nullif not found.
-
getInstant
Description copied from interface:JsonArrayGets an Instant from aISO 8601date element.- Specified by:
getInstantin interfaceJsonArray- Returns:
- the element or the specified
defaultValueif not found.
-
getObject
Description copied from interface:JsonArrayGets an element, untyped. -
getObject
Description copied from interface:JsonArrayGets an element, untyped. -
getElementNoKeyParsing
protected Object getElementNoKeyParsing(String jsonPath, boolean hasDefaultValue, Object defaultValue) Description copied from class:JsonObjectArrayBaseGets the element at this key/index, without key parsing.- Specified by:
getElementNoKeyParsingin classJsonObjectArrayBase
-
getArrayFirst
protected <T> T getArrayFirst(int index, boolean hasDefaultValue, T defaultValue, JsonObjectDefault.IFirstElementGetter<T> firstElementGetter) -
getArrayFirstJsonObject
Description copied from interface:JsonArrayGets the first element (as JsonObject) of aJsonArrayelement.- Specified by:
getArrayFirstJsonObjectin interfaceJsonArray- Returns:
- the element or
nullif the array or the first element are not found.
-
getArrayFirstJsonObject
Description copied from interface:JsonArrayGets the first element (as JsonObject) of aJsonArrayelement.- Specified by:
getArrayFirstJsonObjectin interfaceJsonArray- Returns:
- the element or the specified
defaultValueif the array or the first element are not found.
-
getArrayFirstJsonArray
Description copied from interface:JsonArrayGets the first element (as JsonArray) of aJsonArrayelement.- Specified by:
getArrayFirstJsonArrayin interfaceJsonArray- Returns:
- the element or
nullif the array or the first element are not found.
-
getArrayFirstJsonArray
Description copied from interface:JsonArrayGets the first element (as JsonArray) of aJsonArrayelement.- Specified by:
getArrayFirstJsonArrayin interfaceJsonArray- Returns:
- the element or the specified
defaultValueif the array or the first element are not found.
-
getArrayFirstString
Description copied from interface:JsonArrayGets the first element (as String) of aJsonArrayelement.- Specified by:
getArrayFirstStringin interfaceJsonArray- Returns:
- the element or
nullif the array or the first element are not found.
-
getArrayFirstString
Description copied from interface:JsonArrayGets the first element (as String) of aJsonArrayelement.- Specified by:
getArrayFirstStringin interfaceJsonArray- Returns:
- the element or the specified
defaultValueif the array or the first element are not found.
-
getArrayFirstInteger
Description copied from interface:JsonArrayGets the first element (as Integer) of aJsonArrayelement.- Specified by:
getArrayFirstIntegerin interfaceJsonArray- Returns:
- the element or
nullif the array or the first element are not found.
-
getArrayFirstInteger
Description copied from interface:JsonArrayGets the first element (as Integer) of aJsonArrayelement.- Specified by:
getArrayFirstIntegerin interfaceJsonArray- Returns:
- the element or the specified
defaultValueif the array or the first element are not found.
-
getArrayFirstLong
Description copied from interface:JsonArrayGets the first element (as Long) of aJsonArrayelement.- Specified by:
getArrayFirstLongin interfaceJsonArray- Returns:
- the element or
nullif the array or the first element are not found.
-
getArrayFirstLong
Description copied from interface:JsonArrayGets the first element (as Long) of aJsonArrayelement.- Specified by:
getArrayFirstLongin interfaceJsonArray- Returns:
- the element or the specified
defaultValueif the array or the first element are not found.
-
getArrayFirstDouble
Description copied from interface:JsonArrayGets the first element (as Double) of aJsonArrayelement.- Specified by:
getArrayFirstDoublein interfaceJsonArray- Returns:
- the element or
nullif the array or the first element are not found.
-
getArrayFirstDouble
Description copied from interface:JsonArrayGets the first element (as Double) of aJsonArrayelement.- Specified by:
getArrayFirstDoublein interfaceJsonArray- Returns:
- the element or the specified
defaultValueif the array or the first element are not found.
-
getArrayFirstFloat
Description copied from interface:JsonArrayGets the first element (as Float) of aJsonArrayelement.- Specified by:
getArrayFirstFloatin interfaceJsonArray- Returns:
- the element or
nullif the array or the first element are not found.
-
getArrayFirstFloat
Description copied from interface:JsonArrayGets the first element (as Float) of aJsonArrayelement.- Specified by:
getArrayFirstFloatin interfaceJsonArray- Returns:
- the element or the specified
defaultValueif the array or the first element are not found.
-
getArrayFirstBoolean
Description copied from interface:JsonArrayGets the first element (as Boolean) of aJsonArrayelement.- Specified by:
getArrayFirstBooleanin interfaceJsonArray- Returns:
- the element or
nullif the array or the first element are not found.
-
getArrayFirstBoolean
Description copied from interface:JsonArrayGets the first element (as Boolean) of aJsonArrayelement.- Specified by:
getArrayFirstBooleanin interfaceJsonArray- Returns:
- the element or the specified
defaultValueif the array or the first element are not found.
-
getArrayFirstBigDecimal
Description copied from interface:JsonArrayGets the first element (as BigDecimal) of aJsonArrayelement.- Specified by:
getArrayFirstBigDecimalin interfaceJsonArray- Returns:
- the element or
nullif the array or the first element are not found.
-
getArrayFirstBigDecimal
Description copied from interface:JsonArrayGets the first element (as BigDecimal) of aJsonArrayelement.- Specified by:
getArrayFirstBigDecimalin interfaceJsonArray- Returns:
- the element or the specified
defaultValueif the array or the first element are not found.
-
getArrayFirstBytesFromBase64String
public byte[] getArrayFirstBytesFromBase64String(int index) Description copied from interface:JsonArrayGets the first element (as byte[]) of aJsonArrayelement.- Specified by:
getArrayFirstBytesFromBase64Stringin interfaceJsonArray- Returns:
- the element or
nullif the array or the first element are not found.
-
getArrayFirstBytesFromBase64String
public byte[] getArrayFirstBytesFromBase64String(int index, byte[] defaultValue) Description copied from interface:JsonArrayGets the first element (as byte[]) of aJsonArrayelement.- Specified by:
getArrayFirstBytesFromBase64Stringin interfaceJsonArray- Returns:
- the element or the specified
defaultValueif the array or the first element are not found.
-
getArrayFirstDate
Description copied from interface:JsonArrayGets the first element (as Date) of aJsonArrayelement.- Specified by:
getArrayFirstDatein interfaceJsonArray- Returns:
- the element or
nullif the array or the first element are not found.
-
getArrayFirstDate
Description copied from interface:JsonArrayGets the first element (as Date) of aJsonArrayelement.- Specified by:
getArrayFirstDatein interfaceJsonArray- Returns:
- the element or the specified
defaultValueif the array or the first element are not found.
-
getArrayFirstInstant
Description copied from interface:JsonArrayGets the first element (as Instant) of aJsonArrayelement.- Specified by:
getArrayFirstInstantin interfaceJsonArray- Returns:
- the element or
nullif the array or the first element are not found.
-
getArrayFirstInstant
Description copied from interface:JsonArrayGets the first element (as Instant) of aJsonArrayelement.- Specified by:
getArrayFirstInstantin interfaceJsonArray- Returns:
- the element or the specified
defaultValueif the array or the first element are not found.
-
convertToPlainList
Description copied from interface:JsonArrayConverts theJsonArrayto a plainList<Object>. AllJsonObjectelements will be converted to Maps and allJsonArrayelements will be converted to Lists.This list is always a new instance and is mutable.
- Specified by:
convertToPlainListin interfaceJsonArray
-
isCanBeConvertedToString
public boolean isCanBeConvertedToString(int index) Description copied from interface:JsonArrayValidates that the element at the specifiedindexexists and is currentlynull, of typeString, or can be converted and retrieved as one.- Specified by:
isCanBeConvertedToStringin interfaceJsonArray
-
isCanBeConvertedToInteger
public boolean isCanBeConvertedToInteger(int index) Description copied from interface:JsonArrayValidates that the element at the specifiedindexexists and is currentlynull, of typeInteger, or can be converted and retrieved as one.- Specified by:
isCanBeConvertedToIntegerin interfaceJsonArray
-
isCanBeConvertedToLong
public boolean isCanBeConvertedToLong(int index) Description copied from interface:JsonArrayValidates that the element at the specifiedindexexists and is currentlynull, of typeLong, or can be converted and retrieved as one.- Specified by:
isCanBeConvertedToLongin interfaceJsonArray
-
isCanBeConvertedToFloat
public boolean isCanBeConvertedToFloat(int index) Description copied from interface:JsonArrayValidates that the element at the specifiedindexexists and is currentlynull, of typeFloat, or can be converted and retrieved as one.- Specified by:
isCanBeConvertedToFloatin interfaceJsonArray
-
isCanBeConvertedToDouble
public boolean isCanBeConvertedToDouble(int index) Description copied from interface:JsonArrayValidates that the element at the specifiedindexexists and is currentlynull, of typeDouble, or can be converted and retrieved as one.- Specified by:
isCanBeConvertedToDoublein interfaceJsonArray
-
isCanBeConvertedToBoolean
public boolean isCanBeConvertedToBoolean(int index) Description copied from interface:JsonArrayValidates that the element at the specifiedindexexists and is currentlynull, of typeBoolean, or can be converted and retrieved as one.- Specified by:
isCanBeConvertedToBooleanin interfaceJsonArray
-
isCanBeConvertedToBigDecimal
public boolean isCanBeConvertedToBigDecimal(int index) Description copied from interface:JsonArrayValidates that the element at the specifiedindexexists and is currentlynull, of typeBigDecimal, or can be converted and retrieved as one.- Specified by:
isCanBeConvertedToBigDecimalin interfaceJsonArray
-
isCanBeConvertedToByteArray
public boolean isCanBeConvertedToByteArray(int index) Description copied from interface:JsonArrayValidates that the element at the specifiedindexexists and is currentlynull, of typebase 64 Stringrepresenting a byte array, or can be converted and retrieved as one.- Specified by:
isCanBeConvertedToByteArrayin interfaceJsonArray
-
isCanBeConvertedToDate
public boolean isCanBeConvertedToDate(int index) Description copied from interface:JsonArrayValidates that the element at the specifiedindexexists and is currentlynull, of typeDate, or can be converted and retrieved as one.- Specified by:
isCanBeConvertedToDatein interfaceJsonArray
-
isCanBeConvertedToJsonObject
public boolean isCanBeConvertedToJsonObject(int index) Description copied from interface:JsonArrayValidates that the element at the specifiedindexexists and is currentlynull, of typeJsonObject, or can be converted and retrieved as one.- Specified by:
isCanBeConvertedToJsonObjectin interfaceJsonArray
-
isCanBeConvertedToJsonArray
public boolean isCanBeConvertedToJsonArray(int index) Description copied from interface:JsonArrayValidates that the element at the specifiedindexexists and is currentlynull, of typeJsonArray, or can be converted and retrieved as one.- Specified by:
isCanBeConvertedToJsonArrayin interfaceJsonArray
-
isOfTypeString
public boolean isOfTypeString(int index) Description copied from interface:JsonArrayValidates that the element at the specifiedindexexists and is currentlynullor of typeString, without requiring any conversion.- Specified by:
isOfTypeStringin interfaceJsonArray
-
isOfTypeInteger
public boolean isOfTypeInteger(int index) Description copied from interface:JsonArrayValidates that the element at the specifiedindexexists and is currentlynullor of typeInteger, without requiring any conversion.- Specified by:
isOfTypeIntegerin interfaceJsonArray
-
isOfTypeLong
public boolean isOfTypeLong(int index) Description copied from interface:JsonArrayValidates that the element at the specifiedindexexists and is currentlynullor of typeLong, without requiring any conversion.- Specified by:
isOfTypeLongin interfaceJsonArray
-
isOfTypeFloat
public boolean isOfTypeFloat(int index) Description copied from interface:JsonArrayValidates that the element at the specifiedindexexists and is currentlynullor of typeFloat, without requiring any conversion.- Specified by:
isOfTypeFloatin interfaceJsonArray
-
isOfTypeDouble
public boolean isOfTypeDouble(int index) Description copied from interface:JsonArrayValidates that the element at the specifiedindexexists and is currentlynullor of typeDouble, without requiring any conversion.- Specified by:
isOfTypeDoublein interfaceJsonArray
-
isOfTypeBoolean
public boolean isOfTypeBoolean(int index) Description copied from interface:JsonArrayValidates that the element at the specifiedindexexists and is currentlynullor of typeBoolean, without requiring any conversion.- Specified by:
isOfTypeBooleanin interfaceJsonArray
-
isOfTypeBigDecimal
public boolean isOfTypeBigDecimal(int index) Description copied from interface:JsonArrayValidates that the element at the specifiedindexexists and is currentlynullor of typeBigDecimal, without requiring any conversion.- Specified by:
isOfTypeBigDecimalin interfaceJsonArray
-
isOfTypeByteArray
public boolean isOfTypeByteArray(int index, boolean acceptBase64StringToo) Description copied from interface:JsonArrayValidates that the element at the specifiedJsonPathexists and is currentlynullor of typebyte[], without requiring any conversion.- Specified by:
isOfTypeByteArrayin interfaceJsonArrayacceptBase64StringToo- iftrue, then a valid base 64 String will also be accepted.
-
isOfTypeDate
public boolean isOfTypeDate(int index) Description copied from interface:JsonArrayValidates that the element at the specifiedindexexists and is currentlynullor of typeDate, without requiring any conversion.- Specified by:
isOfTypeDatein interfaceJsonArray
-
isOfTypeJsonObject
public boolean isOfTypeJsonObject(int index) Description copied from interface:JsonArrayValidates that the element at the specifiedindexexists and is currentlynullor of typeJsonObject, without requiring any conversion.- Specified by:
isOfTypeJsonObjectin interfaceJsonArray
-
isOfTypeJsonArray
public boolean isOfTypeJsonArray(int index) Description copied from interface:JsonArrayValidates that the element at the specifiedindexexists and is currentlynullor of typeJsonArray, without requiring any conversion.- Specified by:
isOfTypeJsonArrayin interfaceJsonArray
-
isNull
public boolean isNull(int index) Description copied from interface:JsonArrayValidates that there is an element at the specifiedindexand it isnull. -
isEquivalentTo
Description copied from interface:JsonArrayCompares the currentJsonArrayto the specified one and returnstrueif they are equivalent. To be equivalent, all their elements must be so too.An element is equivalent to the other if they can be converted to the¸ same type, and then if they are equals.
For example, the
String"123" is equivalent tonew BigDecimal("123")or to123L.- Specified by:
isEquivalentToin interfaceJsonArray
-
clone
Description copied from class:JsonObjectArrayBaseClone the object.- Specified by:
clonein interfaceJsonArray- Specified by:
clonein interfaceJsonObjectOrArray- Specified by:
clonein classJsonObjectArrayBase- Parameters:
mutable- iftruethe resulting object and all its children will be mutable, otherwise they will all be immutable.
-
transformAll
Description copied from interface:JsonObjectOrArrayTransforms all the elements of the object, using the specified transformer.- Specified by:
transformAllin interfaceJsonObjectOrArray- Specified by:
transformAllin classJsonObjectArrayBaserecursive- iftrue, then all children elements will also be transformed, recursively.
-
transform
Description copied from interface:JsonArrayTransforms the element at the given index, using the specifiedElementTransformer. -
trim
public void trim(int index) Description copied from interface:JsonArrayTrims the element, if it's of typeString. -
putAsIs
- Specified by:
putAsIsin classJsonObjectArrayBase
-