handlebars-jackson2/src/main/java/com/github/jknack/handlebars/JsonNodeValueResolver.java
private static Object resolve(final JsonNode node) {
    // binary node
    if (node instanceof BinaryNode) {
      return ((BinaryNode) node).binaryValue();
    }
    // boolean node
    if (node instanceof BooleanNode) {
      return ((BooleanNode) node).booleanValue();
    }
    // null node
    if (node instanceof NullNode) {
      return null;
    }
    // numeric nodes
    if (node instanceof BigIntegerNode) {
      return ((BigIntegerNode) node).bigIntegerValue();
    }
    if (node instanceof DecimalNode) {
      return ((DecimalNode) node).decimalValue();
    }
    if (node instanceof DoubleNode) {
      return ((DoubleNode) node).doubleValue();
    }
    if (node instanceof IntNode) {
      return ((IntNode) node).intValue();
    }
    if (node instanceof LongNode) {
      return ((LongNode) node).longValue();
    }
    // pojo
    if (node instanceof POJONode) {
      return ((POJONode) node).getPojo();
    }
    // string
    if (node instanceof TextNode) {
      return ((TextNode) node).textValue();
    }
    // object node to map
    if (node instanceof ObjectNode) {
      return toMap((ObjectNode) node);
    }
    // container, array or null
    return node;
  }
/**
   * Resolve a {@link JsonNode} object to a primitive value.
   *
   * @param node A {@link JsonNode} object.
   * @return A primitive value, json object, json array or null.
   */
Resolve a  JsonNode object to a primitive value.
@param node A  JsonNode object.
@return A primitive value, json object, json array or null.
Resolve a JsonNode object to a primitive value . @param node A JsonNode object . @return A primitive value json object json array or null .
private static Object resolve(final JsonNode node) {
    if (node instanceof BinaryNode) {
      return ((BinaryNode) node).binaryValue();
    }
    if (node instanceof BooleanNode) {
      return ((BooleanNode) node).booleanValue();
    }
    if (node instanceof NullNode) {
      return null;
    }
    if (node instanceof BigIntegerNode) {
      return ((BigIntegerNode) node).bigIntegerValue();
    }
    if (node instanceof DecimalNode) {
      return ((DecimalNode) node).decimalValue();
    }
    if (node instanceof DoubleNode) {
      return ((DoubleNode) node).doubleValue();
    }
    if (node instanceof IntNode) {
      return ((IntNode) node).intValue();
    }
    if (node instanceof LongNode) {
      return ((LongNode) node).longValue();
    }
    if (node instanceof POJONode) {
      return ((POJONode) node).getPojo();
    }
    if (node instanceof TextNode) {
      return ((TextNode) node).textValue();
    }
    if (node instanceof ObjectNode) {
      return toMap((ObjectNode) node);
    }
    return node;
  }
private static Object resolve ( final JsonNode node ) { if ( node instanceof BinaryNode ) { return ( ( BinaryNode ) node ) . binaryValue ( ) ; } if ( node instanceof BooleanNode ) { return ( ( BooleanNode ) node ) . booleanValue ( ) ; } if ( node instanceof NullNode ) { return null ; } if ( node instanceof BigIntegerNode ) { return ( ( BigIntegerNode ) node ) . bigIntegerValue ( ) ; } if ( node instanceof DecimalNode ) { return ( ( DecimalNode ) node ) . decimalValue ( ) ; } if ( node instanceof DoubleNode ) { return ( ( DoubleNode ) node ) . doubleValue ( ) ; } if ( node instanceof IntNode ) { return ( ( IntNode ) node ) . intValue ( ) ; } if ( node instanceof LongNode ) { return ( ( LongNode ) node ) . longValue ( ) ; } if ( node instanceof POJONode ) { return ( ( POJONode ) node ) . getPojo ( ) ; } if ( node instanceof TextNode ) { return ( ( TextNode ) node ) . textValue ( ) ; } if ( node instanceof ObjectNode ) { return toMap ( ( ObjectNode ) node ) ; } return node ; }
Resolve a {@link JsonNode} object to a primitive value.
Resolve a { @link JsonNode } object to a primitive value .
// binary node // boolean node // null node // numeric nodes // pojo // string // object node to map // container, array or null