List of usage examples for com.fasterxml.jackson.databind.node ValueNode getClass
@HotSpotIntrinsicCandidate public final native Class<?> getClass();
From source file:com.redhat.lightblue.util.JsonUtils.java
/** * Returns a Java object for a json value node based on the node type. *///w ww . java2 s . c o m public static Object valueFromJson(ValueNode node) { if (node instanceof NullNode) { return null; } else { if (node instanceof TextNode) { return node.textValue(); } else if (node instanceof BooleanNode) { return node.booleanValue(); } else if (node instanceof NumericNode) { return node.numberValue(); } else { throw new RuntimeException("Unsupported node type:" + node.getClass().getName()); } } }