public void add(JsonNode value) { if (value == null) { // let's not store 'raw' nulls but nodes value = nullNode(); } _add(value); }
/** * Method that will construct an ObjectNode and add it at the end * of this array node. * * @return Newly constructed ObjectNode */ public ObjectNode addObject() { ObjectNode n = objectNode(); _add(n); return n; }
/** * Method that will construct an ArrayNode and add it as a * field of this ObjectNode, replacing old value, if any. * * @return Newly constructed ArrayNode */ public ArrayNode addArray() { ArrayNode n = arrayNode(); _add(n); return n; }
/** * Method for setting value of a field to specified numeric value. */ public void add(int v) { _add(numberNode(v)); }
/** * Method for setting value of a field to specified numeric value. */ public void add(float v) { _add(numberNode(v)); }
/** * Method for setting value of a field to specified numeric value. */ public void add(long v) { _add(numberNode(v)); }
public void addNull() { _add(nullNode()); }
/** * Method for setting value of a field to specified numeric value. */ public void add(double v) { _add(numberNode(v)); }
/** * Method for setting value of a field to specified String value. */ public void add(boolean v) { _add(booleanNode(v)); }
/** * Alternative method that we need to avoid bumping into NPE issues * with auto-unboxing. * * @since 1.9 */ public void add(Long value) { if (value == null) { addNull(); } else { _add(numberNode(value.longValue())); } }
/** * Alternative method that we need to avoid bumping into NPE issues * with auto-unboxing. * * @since 1.9 */ public void add(Boolean value) { if (value == null) { addNull(); } else { _add(booleanNode(value.booleanValue())); } }
/** * Alternative method that we need to avoid bumping into NPE issues * with auto-unboxing. * * @since 1.9 */ public void add(Integer value) { if (value == null) { addNull(); } else { _add(numberNode(value.intValue())); } }
/** * Alternative method that we need to avoid bumping into NPE issues * with auto-unboxing. * * @since 1.9 */ public void add(Float value) { if (value == null) { addNull(); } else { _add(numberNode(value.floatValue())); } }
/** * Alternative method that we need to avoid bumping into NPE issues * with auto-unboxing. * * @since 1.9 */ public void add(Double value) { if (value == null) { addNull(); } else { _add(numberNode(value.doubleValue())); } }
/** * Method for setting value of a field to specified String value. */ public void add(String v) { if (v == null) { addNull(); } else { _add(textNode(v)); } }
/** * Method for setting value of a field to specified binary value */ public void add(byte[] v) { if (v == null) { addNull(); } else { _add(binaryNode(v)); } }
/** * Method that will construct a POJONode and add it at the end * of this array node. */ public void addPOJO(Object value) { if (value == null) { addNull(); } else { _add(POJONode(value)); } }
/** * Method for setting value of a field to specified numeric value. */ public void add(BigDecimal v) { if (v == null) { addNull(); } else { _add(numberNode(v)); } }
public void add(JsonNode value) { if (value == null) { // let's not store 'raw' nulls but nodes value = nullNode(); } _add(value); }
/** * Method that will construct an ObjectNode and add it at the end * of this array node. * * @return Newly constructed ObjectNode */ public ObjectNode addObject() { ObjectNode n = objectNode(); _add(n); return n; }