public class JacksonJsonNode extends SpinJsonNode
| Modifier and Type | Field and Description |
|---|---|
protected JacksonJsonDataFormat |
dataFormat |
protected com.fasterxml.jackson.databind.JsonNode |
jsonNode |
| Constructor and Description |
|---|
JacksonJsonNode(com.fasterxml.jackson.databind.JsonNode jsonNode,
JacksonJsonDataFormat dataFormat) |
| Modifier and Type | Method and Description |
|---|---|
SpinJsonNode |
append(java.lang.Object property)
Appends a object to the end of the current array node
|
java.lang.Boolean |
boolValue()
Get this node as a boolean value.
|
boolean |
contains(java.lang.Object searchObject)
Returns
true if the array contains the specified object. |
SpinJsonNode |
deleteProp(java.util.List<java.lang.String> names)
Removes a number of properties by a given list of names.
|
SpinJsonNode |
deleteProp(java.lang.String name)
Remove a property of the given node by name.
|
SpinList<SpinJsonNode> |
elements()
Get this node as list.
|
java.util.List<java.lang.String> |
fieldNames()
Get the field names of this node (i.e.
|
protected java.lang.Integer |
getCorrectIndex(java.lang.Integer index)
fetch correct array index if index is less than 0
ArrayNode will convert all negative integers into 0...
|
java.lang.String |
getDataFormatName()
Provides the name of the dataformat used by this spin.
|
com.fasterxml.jackson.databind.node.JsonNodeType |
getNodeType() |
boolean |
hasProp(java.lang.String name)
Check if this node has a property with the given name.
|
java.lang.Integer |
indexOf(java.lang.Object searchObject)
Fetches the first index of the searched object in an array.
|
SpinJsonNode |
insertAfter(java.lang.Object searchObject,
java.lang.Object insertObject)
Inserts an object AFTER an specific object in an array
|
SpinJsonNode |
insertAt(int index,
java.lang.Object property)
Appends an object at a specific point in an array
|
SpinJsonNode |
insertBefore(java.lang.Object searchObject,
java.lang.Object insertObject)
Inserts an object BEFORE an specific object in an array
|
java.lang.Boolean |
isArray()
Check if this node is a array value.
|
java.lang.Boolean |
isBoolean()
Check if this node is a boolean value.
|
java.lang.Boolean |
isNull()
Check if this node represents a null value.
|
java.lang.Boolean |
isNumber()
Check if this node is a number value.
|
boolean |
isObject()
Check if this node is an object node.
|
java.lang.Boolean |
isString()
Check if this node is a string value.
|
java.lang.Boolean |
isValue()
Check if this node is a value.
|
SpinJsonPathQuery |
jsonPath(java.lang.String expression)
Creates a JsonPath query on this element.
|
java.lang.Integer |
lastIndexOf(java.lang.Object searchObject)
Fetches the last index of the searched object in an array.
|
protected int |
lookupArray(com.fasterxml.jackson.databind.JsonNode searchNode,
int direction) |
<C> C |
mapTo(java.lang.Class<C> type)
Maps the json represented by this object to a java object of the given type.
Note: the desired target type is not validated and needs to be trusted. |
<C> C |
mapTo(com.fasterxml.jackson.databind.JavaType type)
Maps the json represented by this object to a java object of the given type.
Note: the desired target type is not validated and needs to be trusted. |
<C> C |
mapTo(java.lang.String type)
Maps the json represented by this object to a java object of the given type.
|
java.lang.Number |
numberValue()
Get this node as a number value.
|
SpinJsonNode |
prop(java.lang.String name)
Get the property of this node with the given name.
|
SpinJsonNode |
prop(java.lang.String name,
boolean newProperty)
Set a new boolean property in this node.
|
SpinJsonNode |
prop(java.lang.String name,
java.lang.Boolean newProperty)
Set a new Boolean property in this node.
|
SpinJsonNode |
prop(java.lang.String name,
float newProperty)
Set a new float property in this node.
|
SpinJsonNode |
prop(java.lang.String name,
int newProperty)
Set a new int property in this node.
|
SpinJsonNode |
prop(java.lang.String name,
java.util.List<java.lang.Object> newProperty)
Set a new List property in this node.
|
SpinJsonNode |
prop(java.lang.String name,
long newProperty)
Set a new long property in this node.
|
SpinJsonNode |
prop(java.lang.String name,
java.util.Map<java.lang.String,java.lang.Object> newProperty)
Set a new Map property in this node.
|
SpinJsonNode |
prop(java.lang.String name,
java.lang.Number newProperty)
Set a new Number property in this node.
|
SpinJsonNode |
prop(java.lang.String name,
SpinJsonNode newProperty)
Set a new SpinJsonNode Object property in this node.
|
SpinJsonNode |
prop(java.lang.String name,
java.lang.String newProperty)
Set a new String property in this node.
|
SpinJsonNode |
propList(java.lang.String name,
java.util.List<java.lang.Object> newProperty) |
SpinJsonNode |
remove(java.lang.Object property)
Removes the first appearance of an object from the current array
|
SpinJsonNode |
removeAt(int index)
removes an object at the specific index of the current array
|
SpinJsonNode |
removeLast(java.lang.Object property)
Removes the last appearance of an object from the current array
|
java.lang.String |
stringValue()
Get this node as a string value.
|
java.lang.String |
toString()
Returns the wrapped object as string representation.
|
com.fasterxml.jackson.databind.JsonNode |
unwrap()
Return the wrapped object.
|
java.lang.Object |
value()
Gets the actual value of the node, in case it is a Boolean/String/Number/Null node.
|
void |
writeToWriter(java.io.Writer writer)
Writes the wrapped object to a existing writer.
|
protected final com.fasterxml.jackson.databind.JsonNode jsonNode
protected final JacksonJsonDataFormat dataFormat
public JacksonJsonNode(com.fasterxml.jackson.databind.JsonNode jsonNode,
JacksonJsonDataFormat dataFormat)
public java.lang.String getDataFormatName()
SpingetDataFormatName in class Spin<SpinJsonNode>public com.fasterxml.jackson.databind.JsonNode unwrap()
Spinunwrap in class Spin<SpinJsonNode>public java.lang.String toString()
SpintoString in class Spin<SpinJsonNode>public void writeToWriter(java.io.Writer writer)
SpinwriteToWriter in class Spin<SpinJsonNode>writer - the writer to write toprotected java.lang.Integer getCorrectIndex(java.lang.Integer index)
index - wanted indexInteger new indexprotected int lookupArray(com.fasterxml.jackson.databind.JsonNode searchNode,
int direction)
public java.lang.Integer indexOf(java.lang.Object searchObject)
SpinJsonNodeindexOf in class SpinJsonNodesearchObject - Object for which the index should be searched.Integer index of searchObject.public java.lang.Integer lastIndexOf(java.lang.Object searchObject)
SpinJsonNodelastIndexOf in class SpinJsonNodesearchObject - Object for which the index should be searched.Integer index of searchObject.public boolean contains(java.lang.Object searchObject)
SpinJsonNodetrue if the array contains the specified object.contains in class SpinJsonNodesearchObject - Object for which the array should be searched.true if the array contains the object.public boolean isObject()
SpinJsonNodeisObject in class SpinJsonNodepublic boolean hasProp(java.lang.String name)
SpinJsonNodehasProp in class SpinJsonNodename - the name of the propertypublic SpinJsonNode prop(java.lang.String name)
SpinJsonNodeprop in class SpinJsonNodename - the name of the propertySpinJsonNode representation of the propertypublic SpinJsonNode prop(java.lang.String name, java.lang.String newProperty)
SpinJsonNodeprop in class SpinJsonNodename - the name of the new propertynewProperty - the new String propertySpinJsonNode representation of the current nodepublic SpinJsonNode prop(java.lang.String name, java.lang.Number newProperty)
SpinJsonNodeprop in class SpinJsonNodename - the name of the new propertynewProperty - the new Number propertySpinJsonNode representation of the current nodepublic SpinJsonNode prop(java.lang.String name, int newProperty)
SpinJsonNodeprop in class SpinJsonNodename - the name of the new propertynewProperty - the new int propertySpinJsonNode representation of the current nodepublic SpinJsonNode prop(java.lang.String name, float newProperty)
SpinJsonNodeprop in class SpinJsonNodename - the name of the new propertynewProperty - the new float propertySpinJsonNode representation of the current nodepublic SpinJsonNode prop(java.lang.String name, long newProperty)
SpinJsonNodeprop in class SpinJsonNodename - the name of the new propertynewProperty - the new long propertySpinJsonNode representation of the current nodepublic SpinJsonNode prop(java.lang.String name, boolean newProperty)
SpinJsonNodeprop in class SpinJsonNodename - the name of the new propertynewProperty - the new boolean propertySpinJsonNode representation of the current nodepublic SpinJsonNode prop(java.lang.String name, java.lang.Boolean newProperty)
SpinJsonNodeprop in class SpinJsonNodename - the name of the new propertynewProperty - the new Boolean propertySpinJsonNode representation of the current nodepublic SpinJsonNode prop(java.lang.String name, java.util.List<java.lang.Object> newProperty)
SpinJsonNodeprop in class SpinJsonNodename - the name of the new propertynewProperty - the new List propertySpinJsonNode representation of the current nodepublic SpinJsonNode propList(java.lang.String name, java.util.List<java.lang.Object> newProperty)
public SpinJsonNode prop(java.lang.String name, java.util.Map<java.lang.String,java.lang.Object> newProperty)
SpinJsonNodeprop in class SpinJsonNodename - the name of the new propertynewProperty - the new Map propertySpinJsonNode representation of the current nodepublic SpinJsonNode prop(java.lang.String name, SpinJsonNode newProperty)
SpinJsonNodeprop in class SpinJsonNodename - the name of the new propertynewProperty - the new SpinJsonNode Object propertySpinJsonNode representation of the current nodepublic SpinJsonNode deleteProp(java.lang.String name)
SpinJsonNodedeleteProp in class SpinJsonNodename - name of the propertySpinJsonNode representation of the current nodepublic SpinJsonNode deleteProp(java.util.List<java.lang.String> names)
SpinJsonNodedeleteProp in class SpinJsonNodenames - list of namesSpinJsonNode representation of the current nodepublic SpinJsonNode append(java.lang.Object property)
SpinJsonNodeappend in class SpinJsonNodeproperty - property which should be appendSpinJsonNode representation of the current nodepublic SpinJsonNode insertAt(int index, java.lang.Object property)
SpinJsonNodeinsertAt in class SpinJsonNodeindex - Index in current node where the new property should be appended.property - Object which should be appended.SpinJsonNode representation of the current node.public SpinJsonNode insertBefore(java.lang.Object searchObject, java.lang.Object insertObject)
SpinJsonNodeinsertBefore in class SpinJsonNodesearchObject - Object which is searchedinsertObject - Object which will be insertedSpinJsonNode representation of the current nodepublic SpinJsonNode insertAfter(java.lang.Object searchObject, java.lang.Object insertObject)
SpinJsonNodeinsertAfter in class SpinJsonNodesearchObject - Object which is searchedinsertObject - Object which will be insertedSpinJsonNode representation of the current nodepublic SpinJsonNode remove(java.lang.Object property)
SpinJsonNoderemove in class SpinJsonNodeproperty - object which should be deletedSpinJsonNode representation of the current nodepublic SpinJsonNode removeLast(java.lang.Object property)
SpinJsonNoderemoveLast in class SpinJsonNodeproperty - object which should be deletedSpinJsonNode representation of the current nodepublic SpinJsonNode removeAt(int index)
SpinJsonNoderemoveAt in class SpinJsonNodeindex - Index of the arraySpinJsonNode representation of the current nodepublic java.lang.Boolean isBoolean()
SpinJsonNodeisBoolean in class SpinJsonNodepublic java.lang.Boolean boolValue()
SpinJsonNodeboolValue in class SpinJsonNodepublic java.lang.Boolean isNumber()
SpinJsonNodeisNumber in class SpinJsonNodepublic java.lang.Number numberValue()
SpinJsonNodenumberValue in class SpinJsonNodepublic java.lang.Boolean isString()
SpinJsonNodeisString in class SpinJsonNodepublic java.lang.String stringValue()
SpinJsonNodestringValue in class SpinJsonNodepublic java.lang.Boolean isNull()
SpinJsonNodeisNull in class SpinJsonNodepublic java.lang.Boolean isValue()
SpinJsonNodeisValue in class SpinJsonNodepublic java.lang.Object value()
SpinJsonNodevalue in class SpinJsonNodepublic java.lang.Boolean isArray()
SpinJsonNodeisArray in class SpinJsonNodepublic SpinList<SpinJsonNode> elements()
SpinJsonNodeSpinList which contains copies of all
JSON nodes contained in the current node. Changes to the the elements in the list will not propagate
to the original nodes.elements in class SpinJsonNodepublic java.util.List<java.lang.String> fieldNames()
SpinJsonNodefieldNames in class SpinJsonNodepublic com.fasterxml.jackson.databind.node.JsonNodeType getNodeType()
public SpinJsonPathQuery jsonPath(java.lang.String expression)
SpinJsonNodejsonPath in class SpinJsonNodeexpression - the JsonPath expressionpublic <C> C mapTo(java.lang.Class<C> type)
mapTo in class Spin<SpinJsonNode>type - the java class to map toSpinJsonException - if the json representation cannot be mapped to the specified typepublic <C> C mapTo(java.lang.String type)
ResolvedType.toCanonical()).mapTo in class Spin<SpinJsonNode>type - the class name to map toSpinJsonException - if the json representation cannot be mapped to the specified typeSpinJsonDataFormatException - if the parameter does not match a valid typepublic <C> C mapTo(com.fasterxml.jackson.databind.JavaType type)
SpinJsonException - if the json representation cannot be mapped to the specified typeCopyright © 2014–2022 Camunda Services GmbH. All rights reserved.