General data-binding functionality for Jackson: works on core streaming API
—
Jackson's JSON Tree Model provides an in-memory tree representation of JSON content, similar to XML DOM. The model is centered around the JsonNode hierarchy, which allows navigation and manipulation of JSON structures without binding to specific Java classes.
The JsonNode tree model consists of a hierarchy of node types representing different JSON value types.
public abstract class JsonNode implements TreeNode, Iterable<JsonNode> {
// Navigation methods
public abstract JsonNode get(int index);
public JsonNode get(String fieldName);
public abstract JsonNode path(String fieldName);
public abstract JsonNode path(int index);
public JsonNode at(String jsonPtrExpr);
public JsonNode at(JsonPointer ptr);
public JsonNode findValue(String fieldName);
public List<JsonNode> findValues(String fieldName, List<JsonNode> foundSoFar);
public List<String> findValuesAsText(String fieldName, List<String> foundSoFar);
public JsonNode findPath(String fieldName);
public JsonNode findParent(String fieldName);
// Type checking methods
public abstract boolean isArray();
public abstract boolean isObject();
public final boolean isValueNode();
public final boolean isContainerNode();
public final boolean isMissingNode();
public boolean isNull();
public boolean isTextual();
public boolean isNumber();
public boolean isBoolean();
public boolean isBinary();
public boolean isPojo();
public boolean isFloatingPointNumber();
public boolean isIntegralNumber();
public boolean isShort();
public boolean isInt();
public boolean isLong();
public boolean isFloat();
public boolean isDouble();
public boolean isBigDecimal();
public boolean isBigInteger();
// Node type enumeration
public abstract JsonNodeType getNodeType();
// Value extraction methods
public String asText();
public String asText(String defaultValue);
public int asInt();
public int asInt(int defaultValue);
public long asLong();
public long asLong(long defaultValue);
public double asDouble();
public double asDouble(double defaultValue);
public boolean asBoolean();
public boolean asBoolean(boolean defaultValue);
public BigInteger asBigInteger();
public BigInteger asBigInteger(BigInteger defaultValue);
// Raw value access (type-specific)
public String textValue();
public byte[] binaryValue() throws IOException;
public boolean booleanValue();
public Number numberValue();
public short shortValue();
public int intValue();
public long longValue();
public float floatValue();
public double doubleValue();
public BigDecimal decimalValue();
public BigInteger bigIntegerValue();
// Container methods
public abstract int size();
public abstract boolean isEmpty();
public boolean has(String fieldName);
public boolean has(int index);
public boolean hasNonNull(String fieldName);
public boolean hasNonNull(int index);
public Iterator<String> fieldNames();
public Iterator<Map.Entry<String, JsonNode>> fields();
public Iterator<JsonNode> elements();
// Iteration support
public Iterator<JsonNode> iterator();
// Serialization
public abstract void serialize(JsonGenerator gen, SerializerProvider serializers) throws IOException;
public abstract void serializeWithType(JsonGenerator gen, SerializerProvider serializers, TypeSerializer typeSer) throws IOException;
// JSON Pointer support
public JsonNode at(JsonPointer ptr);
public JsonNode at(String jsonPtrExpr);
// Tree traversal
public abstract JsonNode deepCopy();
// Comparison
public abstract boolean equals(Object o);
public final boolean equals(Comparator<JsonNode> comparator, JsonNode other);
// String representation
public abstract String toString();
public String toPrettyString();
// Required fields checking (for validation)
public JsonNode required(String fieldName) throws IllegalArgumentException;
public JsonNode required(int index) throws IllegalArgumentException;
public JsonNode requiredAt(String pathExpr) throws IllegalArgumentException;
public JsonNode requiredAt(JsonPointer path) throws IllegalArgumentException;
// With methods (for creating modified copies)
public JsonNode with(String propertyName);
public JsonNode withArray(String propertyName);
}
// Node type enumeration
public enum JsonNodeType {
ARRAY, BINARY, BOOLEAN, MISSING, NULL, NUMBER, OBJECT, POJO, STRING
}Container nodes represent JSON objects and arrays that can contain other nodes.
ObjectNode represents JSON objects with key-value pairs.
public class ObjectNode extends ContainerNode<ObjectNode> implements Serializable {
// Construction
public ObjectNode(JsonNodeFactory nc);
public ObjectNode(JsonNodeFactory nc, Map<String, JsonNode> kids);
// Field manipulation
public JsonNode set(String fieldName, JsonNode value);
public JsonNode setAll(Map<String,? extends JsonNode> properties);
public JsonNode setAll(ObjectNode other);
public JsonNode replace(String fieldName, JsonNode value);
public JsonNode put(String fieldName, JsonNode value);
public JsonNode putNull(String fieldName);
public JsonNode put(String fieldName, short value);
public JsonNode put(String fieldName, int value);
public JsonNode put(String fieldName, long value);
public JsonNode put(String fieldName, float value);
public JsonNode put(String fieldName, double value);
public JsonNode put(String fieldName, BigDecimal value);
public JsonNode put(String fieldName, BigInteger value);
public JsonNode put(String fieldName, String value);
public JsonNode put(String fieldName, boolean value);
public JsonNode put(String fieldName, byte[] value);
public JsonNode putPOJO(String fieldName, Object pojo);
public JsonNode putRawValue(String fieldName, RawValue raw);
// Array field creation
public ArrayNode putArray(String fieldName);
public ObjectNode putObject(String fieldName);
// Field removal
public JsonNode remove(String fieldName);
public JsonNode remove(Collection<String> fieldNames);
public ObjectNode removeAll();
public ObjectNode retain(Collection<String> fieldNames);
public ObjectNode retain(String... fieldNames);
// Without methods (creates copy without specified fields)
public ObjectNode without(String fieldName);
public ObjectNode without(Collection<String> fieldNames);
// Field access
public JsonNode findValue(String fieldName);
public ObjectNode findParent(String fieldName);
public List<JsonNode> findValues(String fieldName, List<JsonNode> foundSoFar);
public List<String> findValuesAsText(String fieldName, List<String> foundSoFar);
public ObjectNode findParents(String fieldName, List<JsonNode> foundSoFar);
// Iteration
public Iterator<Map.Entry<String, JsonNode>> fields();
public Iterator<String> fieldNames();
public Iterator<JsonNode> elements();
// Properties access
public Collection<String> properties();
public Set<String> keySet();
// Container methods
public int size();
public boolean isEmpty();
public boolean has(String fieldName);
public boolean has(int index);
public boolean hasNonNull(String fieldName);
public boolean hasNonNull(int index);
// Navigation
public JsonNode get(int index);
public JsonNode get(String fieldName);
public JsonNode path(String fieldName);
public JsonNode path(int index);
// Type information
public JsonNodeType getNodeType();
public boolean isObject();
// Copying
public ObjectNode deepCopy();
// Conversion
public String toString();
// Serialization
public void serialize(JsonGenerator gen, SerializerProvider serializers) throws IOException;
public void serializeWithType(JsonGenerator gen, SerializerProvider serializers, TypeSerializer typeSer) throws IOException;
}ArrayNode represents JSON arrays containing ordered sequences of nodes.
public class ArrayNode extends ContainerNode<ArrayNode> implements Serializable {
// Construction
public ArrayNode(JsonNodeFactory nf);
public ArrayNode(JsonNodeFactory nf, int capacity);
public ArrayNode(JsonNodeFactory nf, List<JsonNode> children);
// Element addition
public ArrayNode add(JsonNode value);
public ArrayNode add(short value);
public ArrayNode add(int value);
public ArrayNode add(long value);
public ArrayNode add(float value);
public ArrayNode add(double value);
public ArrayNode add(BigDecimal value);
public ArrayNode add(BigInteger value);
public ArrayNode add(String value);
public ArrayNode add(boolean value);
public ArrayNode add(byte[] value);
public ArrayNode addNull();
public ArrayNode addPOJO(Object pojo);
public ArrayNode addRawValue(RawValue raw);
public ArrayNode addAll(ArrayNode other);
public ArrayNode addAll(Collection<? extends JsonNode> nodes);
// Container addition
public ArrayNode addArray();
public ObjectNode addObject();
// Element insertion
public ArrayNode insert(int index, JsonNode value);
public ArrayNode insert(int index, short value);
public ArrayNode insert(int index, int value);
public ArrayNode insert(int index, long value);
public ArrayNode insert(int index, float value);
public ArrayNode insert(int index, double value);
public ArrayNode insert(int index, BigDecimal value);
public ArrayNode insert(int index, BigInteger value);
public ArrayNode insert(int index, String value);
public ArrayNode insert(int index, boolean value);
public ArrayNode insert(int index, byte[] value);
public ArrayNode insertNull(int index);
public ArrayNode insertPOJO(int index, Object pojo);
// Container insertion
public ArrayNode insertArray(int index);
public ObjectNode insertObject(int index);
// Element modification
public JsonNode set(int index, JsonNode value);
public ArrayNode set(int index, short value);
public ArrayNode set(int index, int value);
public ArrayNode set(int index, long value);
public ArrayNode set(int index, float value);
public ArrayNode set(int index, double value);
public ArrayNode set(int index, BigDecimal value);
public ArrayNode set(int index, BigInteger value);
public ArrayNode set(int index, String value);
public ArrayNode set(int index, boolean value);
public ArrayNode set(int index, byte[] value);
public ArrayNode setNull(int index);
public ArrayNode setPOJO(int index, Object pojo);
// Element removal
public JsonNode remove(int index);
public ArrayNode removeAll();
// Element access
public JsonNode get(int index);
public JsonNode path(int index);
public JsonNode path(String fieldName);
public boolean has(int index);
public boolean hasNonNull(int index);
// Container methods
public int size();
public boolean isEmpty();
public Iterator<JsonNode> elements();
public Iterator<JsonNode> iterator();
// Type information
public JsonNodeType getNodeType();
public boolean isArray();
// Copying
public ArrayNode deepCopy();
// Serialization
public void serialize(JsonGenerator gen, SerializerProvider serializers) throws IOException;
public void serializeWithType(JsonGenerator gen, SerializerProvider serializers, TypeSerializer typeSer) throws IOException;
// String representation
public String toString();
}Value nodes represent leaf values in the JSON tree (strings, numbers, booleans, null).
public class TextNode extends ValueNode {
// Construction
public TextNode(String v);
public static TextNode valueOf(String v);
// Value access
public String textValue();
public String asText();
public String asText(String defaultValue);
public int asInt(int defaultValue);
public long asLong(long defaultValue);
public double asDouble(double defaultValue);
public boolean asBoolean(boolean defaultValue);
// Type information
public JsonNodeType getNodeType();
public boolean isTextual();
// Serialization
public void serialize(JsonGenerator gen, SerializerProvider serializers) throws IOException;
// Comparison and string representation
public boolean equals(Object o);
public int hashCode();
public String toString();
}Base class for all numeric value nodes.
public abstract class NumericNode extends ValueNode {
// Value access methods
public abstract Number numberValue();
public abstract int intValue();
public abstract long longValue();
public abstract double doubleValue();
public abstract BigDecimal decimalValue();
public abstract BigInteger bigIntegerValue();
// Type checking
public final boolean isNumber();
// Conversion methods
public abstract String asText();
public int asInt();
public int asInt(int defaultValue);
public long asLong();
public long asLong(long defaultValue);
public double asDouble();
public double asDouble(double defaultValue);
}
// Specific numeric node types
public class IntNode extends NumericNode {
public IntNode(int v);
public static IntNode valueOf(int i);
public JsonNodeType getNodeType();
public boolean isInt();
public boolean isIntegralNumber();
public Number numberValue();
public int intValue();
public long longValue();
public double doubleValue();
public float floatValue();
public short shortValue();
public BigDecimal decimalValue();
public BigInteger bigIntegerValue();
public String asText();
public boolean canConvertToInt();
public boolean canConvertToLong();
public void serialize(JsonGenerator gen, SerializerProvider serializers) throws IOException;
}
public class LongNode extends NumericNode {
public LongNode(long v);
public static LongNode valueOf(long l);
// Similar methods as IntNode but for long values
}
public class DoubleNode extends NumericNode {
public DoubleNode(double v);
public static DoubleNode valueOf(double v);
// Similar methods as IntNode but for double values
}
public class DecimalNode extends NumericNode {
public DecimalNode(BigDecimal v);
public static DecimalNode valueOf(BigDecimal dec);
// Similar methods as IntNode but for BigDecimal values
}
public class BigIntegerNode extends NumericNode {
public BigIntegerNode(BigInteger v);
public static BigIntegerNode valueOf(BigInteger v);
// Similar methods as IntNode but for BigInteger values
}
public class FloatNode extends NumericNode {
public FloatNode(float v);
public static FloatNode valueOf(float v);
// Similar methods as IntNode but for float values
}
public class ShortNode extends NumericNode {
public ShortNode(short v);
public static ShortNode valueOf(short v);
// Similar methods as IntNode but for short values
}public class BooleanNode extends ValueNode {
// Singleton instances
public static final BooleanNode TRUE;
public static final BooleanNode FALSE;
// Factory methods
public static BooleanNode getTrue();
public static BooleanNode getFalse();
public static BooleanNode valueOf(boolean b);
// Value access
public boolean booleanValue();
public String asText();
public boolean asBoolean();
public boolean asBoolean(boolean defaultValue);
public int asInt(int defaultValue);
public long asLong(long defaultValue);
public double asDouble(double defaultValue);
// Type information
public JsonNodeType getNodeType();
public boolean isBoolean();
// Serialization
public void serialize(JsonGenerator gen, SerializerProvider serializers) throws IOException;
// String representation
public String toString();
}public class NullNode extends ValueNode {
// Singleton instance
public static final NullNode instance;
// Factory method
public static NullNode getInstance();
// Type information
public JsonNodeType getNodeType();
public boolean isNull();
// Value access (all return null or defaults)
public String asText();
public String asText(String defaultValue);
public int asInt(int defaultValue);
public long asLong(long defaultValue);
public double asDouble(double defaultValue);
public boolean asBoolean(boolean defaultValue);
// Serialization
public void serialize(JsonGenerator gen, SerializerProvider serializers) throws IOException;
// String representation
public String toString();
}
public final class MissingNode extends ValueNode {
// Singleton instance
private static final MissingNode instance;
// Factory method
public static MissingNode getInstance();
// Type information
public JsonNodeType getNodeType();
public boolean isMissingNode();
// Value access (all return defaults)
public String asText();
public String asText(String defaultValue);
public int asInt(int defaultValue);
public long asLong(long defaultValue);
public double asDouble(double defaultValue);
public boolean asBoolean(boolean defaultValue);
// Navigation (always returns MissingNode)
public JsonNode get(int index);
public JsonNode get(String fieldName);
public JsonNode path(String fieldName);
public JsonNode path(int index);
// String representation
public String toString();
}public class BinaryNode extends ValueNode {
// Construction
public BinaryNode(byte[] data);
public BinaryNode(byte[] data, int offset, int length);
public static BinaryNode valueOf(byte[] data);
public static BinaryNode valueOf(byte[] data, int offset, int length);
// Value access
public byte[] binaryValue();
public byte[] getValue();
public String asText();
// Type information
public JsonNodeType getNodeType();
public boolean isBinary();
// Serialization
public void serialize(JsonGenerator gen, SerializerProvider serializers) throws IOException;
// Comparison
public boolean equals(Object o);
public int hashCode();
}
public class POJONode extends ValueNode {
// Construction
public POJONode(Object pojo);
// Value access
public Object getPojo();
public byte[] binaryValue() throws IOException;
public String asText();
public boolean asBoolean(boolean defaultValue);
public int asInt(int defaultValue);
public long asLong(long defaultValue);
public double asDouble(double defaultValue);
// Type information
public JsonNodeType getNodeType();
public boolean isPojo();
// Serialization
public void serialize(JsonGenerator gen, SerializerProvider serializers) throws IOException;
public void serializeWithType(JsonGenerator gen, SerializerProvider serializers, TypeSerializer typeSer) throws IOException;
// String representation
public String toString();
}Factory for creating JsonNode instances.
public class JsonNodeFactory implements Serializable, JsonNodeCreator {
// Default instance
public static final JsonNodeFactory instance;
// Construction
public JsonNodeFactory();
public JsonNodeFactory(boolean bigDecimalExact);
// Configuration
public JsonNodeFactory enable(JsonNodeFeature f);
public JsonNodeFactory disable(JsonNodeFeature f);
public JsonNodeFactory with(JsonNodeFeature f, boolean state);
public boolean isEnabled(JsonNodeFeature f);
// Container nodes
public ObjectNode objectNode();
public ArrayNode arrayNode();
public ArrayNode arrayNode(int capacity);
// Value nodes
public NullNode nullNode();
public BooleanNode booleanNode(boolean v);
public TextNode textNode(String text);
public BinaryNode binaryNode(byte[] data);
public BinaryNode binaryNode(byte[] data, int offset, int length);
public POJONode pojoNode(Object pojo);
public RawValueNode rawValueNode(RawValue value);
// Numeric nodes
public NumericNode numberNode(byte v);
public NumericNode numberNode(short v);
public NumericNode numberNode(int v);
public NumericNode numberNode(long v);
public NumericNode numberNode(BigInteger v);
public NumericNode numberNode(float v);
public NumericNode numberNode(double v);
public NumericNode numberNode(BigDecimal v);
// Generic number node
public NumericNode numberNode(Number n);
}
public interface JsonNodeCreator {
// Value node creation methods (matching JsonNodeFactory)
ValueNode booleanNode(boolean v);
ValueNode nullNode();
NumericNode numberNode(byte v);
NumericNode numberNode(short v);
NumericNode numberNode(int v);
NumericNode numberNode(long v);
NumericNode numberNode(BigInteger v);
NumericNode numberNode(float v);
NumericNode numberNode(double v);
NumericNode numberNode(BigDecimal v);
ValueNode textNode(String text);
ValueNode binaryNode(byte[] data);
ValueNode binaryNode(byte[] data, int offset, int length);
ValueNode pojoNode(Object pojo);
ArrayNode arrayNode();
ObjectNode objectNode();
}import com.fasterxml.jackson.databind.JsonNode;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.node.ObjectNode;
import com.fasterxml.jackson.databind.node.ArrayNode;
ObjectMapper mapper = new ObjectMapper();
// Parse JSON into tree
String json = "{\"name\":\"John\", \"age\":30, \"children\":[\"Jane\", \"Bob\"]}";
JsonNode root = mapper.readTree(json);
// Navigate tree
String name = root.get("name").asText();
int age = root.get("age").asInt();
JsonNode children = root.get("children");
// Check node types
if (root.isObject()) {
System.out.println("Root is an object");
}
if (children.isArray()) {
System.out.println("Children is an array with " + children.size() + " elements");
}
// Iterate through array
for (JsonNode child : children) {
System.out.println("Child: " + child.asText());
}
// Navigate with path (returns MissingNode if not found)
JsonNode address = root.path("address").path("street");
if (!address.isMissingNode()) {
System.out.println("Street: " + address.asText());
}
// Use JSON Pointer syntax
JsonNode firstChild = root.at("/children/0");
System.out.println("First child: " + firstChild.asText());import com.fasterxml.jackson.databind.node.JsonNodeFactory;
import com.fasterxml.jackson.databind.node.ObjectNode;
import com.fasterxml.jackson.databind.node.ArrayNode;
ObjectMapper mapper = new ObjectMapper();
JsonNodeFactory factory = mapper.getNodeFactory();
// Create object node
ObjectNode person = factory.objectNode();
person.put("name", "John");
person.put("age", 30);
person.put("active", true);
person.putNull("spouse");
// Create array node
ArrayNode hobbies = factory.arrayNode();
hobbies.add("reading");
hobbies.add("swimming");
hobbies.add("coding");
person.set("hobbies", hobbies);
// Create nested object
ObjectNode address = person.putObject("address");
address.put("street", "123 Main St");
address.put("city", "Springfield");
address.put("zip", "12345");
// Convert to JSON string
String json = mapper.writeValueAsString(person);
System.out.println(json);ObjectMapper mapper = new ObjectMapper();
String json = "{\"name\":\"John\", \"age\":30, \"hobbies\":[\"reading\"]}";
JsonNode root = mapper.readTree(json);
// Trees are immutable, but ObjectNode and ArrayNode allow modification
if (root.isObject()) {
ObjectNode obj = (ObjectNode) root;
// Update existing field
obj.put("age", 31);
// Add new field
obj.put("email", "john@example.com");
// Remove field
obj.remove("age");
// Modify array
JsonNode hobbiesNode = obj.get("hobbies");
if (hobbiesNode.isArray()) {
ArrayNode hobbies = (ArrayNode) hobbiesNode;
hobbies.add("swimming");
hobbies.insert(0, "cooking");
}
}
String updatedJson = mapper.writeValueAsString(root);
System.out.println(updatedJson);ObjectMapper mapper = new ObjectMapper();
String complexJson = """
{
"users": [
{
"name": "John",
"contact": {"email": "john@example.com"}
},
{
"name": "Jane",
"contact": {"email": "jane@example.com"}
}
]
}
""";
JsonNode root = mapper.readTree(complexJson);
// Find all values with specific field name
List<JsonNode> emails = new ArrayList<>();
root.findValues("email", emails);
for (JsonNode email : emails) {
System.out.println("Email: " + email.asText());
}
// Find values as text
List<String> emailTexts = root.findValuesAsText("email");
for (String email : emailTexts) {
System.out.println("Email text: " + email);
}
// Recursive traversal
void printAllValues(JsonNode node, String path) {
if (node.isValueNode()) {
System.out.println(path + ": " + node.asText());
} else if (node.isObject()) {
Iterator<Map.Entry<String, JsonNode>> fields = node.fields();
while (fields.hasNext()) {
Map.Entry<String, JsonNode> field = fields.next();
printAllValues(field.getValue(), path + "." + field.getKey());
}
} else if (node.isArray()) {
for (int i = 0; i < node.size(); i++) {
printAllValues(node.get(i), path + "[" + i + "]");
}
}
}
printAllValues(root, "root");ObjectMapper mapper = new ObjectMapper();
// POJO to tree
Person person = new Person("John", 30);
JsonNode tree = mapper.valueToTree(person);
// Tree to POJO
JsonNode personNode = tree;
Person converted = mapper.treeToValue(personNode, Person.class);
// Tree to different types
Map<String, Object> map = mapper.treeToValue(tree, Map.class);
String json = mapper.writeValueAsString(tree);
// Modify tree then convert
if (tree.isObject()) {
ObjectNode obj = (ObjectNode) tree;
obj.put("modified", true);
}
Person modified = mapper.treeToValue(tree, Person.class);ObjectMapper mapper = new ObjectMapper();
// Safe navigation with path()
JsonNode root = mapper.readTree("{\"user\":{\"name\":\"John\"}}");
JsonNode email = root.path("user").path("contact").path("email");
if (email.isMissingNode()) {
System.out.println("Email not found");
} else {
System.out.println("Email: " + email.asText());
}
// Required field access (throws exception if missing)
try {
JsonNode requiredName = root.required("user").required("name");
System.out.println("Name: " + requiredName.asText());
} catch (IllegalArgumentException e) {
System.err.println("Required field missing: " + e.getMessage());
}
// Safe value extraction with defaults
String name = root.path("user").path("name").asText("Unknown");
int age = root.path("user").path("age").asInt(0);
boolean active = root.path("user").path("active").asBoolean(false);// Base container node class
public abstract class ContainerNode<T extends ContainerNode<T>> extends BaseJsonNode {
public abstract int size();
public abstract boolean isEmpty();
public abstract T removeAll();
public T setAll(Map<String, ? extends JsonNode> properties);
public T setAll(ObjectNode other);
}
// Base value node class
public abstract class ValueNode extends BaseJsonNode {
public final boolean isValueNode();
public final boolean isContainerNode();
public JsonNode get(int index);
public JsonNode get(String fieldName);
public JsonNode path(String fieldName);
public JsonNode path(int index);
}
// Base implementation class
public abstract class BaseJsonNode extends JsonNode implements Serializable {
// Common implementations for JsonNode abstract methods
}
// Tree traversing parser for converting trees to token streams
public class TreeTraversingParser extends ParserMinimalBase {
public TreeTraversingParser(JsonNode n);
public TreeTraversingParser(JsonNode n, ObjectCodec codec);
public JsonToken nextToken() throws IOException;
public JsonToken getCurrentToken();
public String getCurrentName() throws IOException;
public void close() throws IOException;
public boolean isClosed();
public JsonNode readValueAsTree() throws IOException;
public JsonLocation getCurrentLocation();
public String getText();
public char[] getTextCharacters() throws IOException;
public int getTextLength() throws IOException;
public int getTextOffset() throws IOException;
public Number getNumberValue() throws IOException;
public NumberType getNumberType() throws IOException;
public int getIntValue() throws IOException;
public long getLongValue() throws IOException;
public BigInteger getBigIntegerValue() throws IOException;
public float getFloatValue() throws IOException;
public double getDoubleValue() throws IOException;
public BigDecimal getDecimalValue() throws IOException;
public byte[] getBinaryValue(Base64Variant b64variant) throws IOException;
public String getValueAsString() throws IOException;
public String getValueAsString(String def) throws IOException;
public int getValueAsInt() throws IOException;
public int getValueAsInt(int def) throws IOException;
public long getValueAsLong() throws IOException;
public long getValueAsLong(long def) throws IOException;
public double getValueAsDouble() throws IOException;
public double getValueAsDouble(double def) throws IOException;
public boolean getValueAsBoolean() throws IOException;
public boolean getValueAsBoolean(boolean def) throws IOException;
}
// JSON Pointer implementation for navigation
public class JsonPointer implements Serializable {
public static final JsonPointer empty();
public static JsonPointer compile(String input) throws IllegalArgumentException;
public static JsonPointer valueOf(String input);
public static JsonPointer forPath(JsonStreamContext context);
public static JsonPointer forPath(JsonStreamContext context, boolean includeRoot);
public boolean matches();
public String getMatchingProperty();
public int getMatchingIndex();
public JsonPointer tail();
public JsonPointer head();
public JsonPointer last();
public JsonPointer parent();
public JsonPointer append(JsonPointer tail);
public JsonPointer append(String property);
public JsonPointer appendIndex(int index);
public String toString();
}Install with Tessl CLI
npx tessl i tessl/maven-com-fasterxml-jackson-core--jackson-databind