Tabnine Logo
org.codehaus.jackson.node
Code IndexAdd Tabnine to your IDE (free)

How to use org.codehaus.jackson.node

Best Java code snippets using org.codehaus.jackson.node (Showing top 20 results out of 909)

origin: org.codehaus.jackson/jackson-mapper-asl

  @Override
  public boolean currentHasChildren() {
    // note: ONLY to be called for container nodes
    return ((ContainerNode) currentNode()).size() > 0;
  }
}
origin: org.codehaus.jackson/jackson-mapper-asl

@Override
public final JsonNode findPath(String fieldName)
{
  JsonNode value = findValue(fieldName);
  if (value == null) {
    return MissingNode.getInstance();
  }
  return value;
}

origin: org.codehaus.jackson/jackson-mapper-asl

  @Override
  public boolean currentHasChildren() {
    // note: ONLY to be called for container nodes
    return ((ContainerNode) currentNode()).size() > 0;
  }
}
origin: org.codehaus.jackson/jackson-mapper-asl

/**
 * Get the default schema node.
 *
 * @return The default schema node.
 */
public static JsonNode getDefaultSchemaNode()
{
  ObjectNode objectNode = JsonNodeFactory.instance.objectNode();
  objectNode.put("type", "any");
  // "required" is false by default, no need to include
  //objectNode.put("required", false);
  return objectNode;
}
origin: org.codehaus.jackson/jackson-mapper-asl

@Override
public String toString()
{
  return this.schema.toString();
}
origin: org.codehaus.jackson/jackson-mapper-asl

/**
 * Method for setting value of a field to specified String value.
 */
public void add(String v) {
  if (v == null) {
    addNull();
  } else {
    _add(textNode(v));
  }
}
origin: org.codehaus.jackson/jackson-mapper-asl

/**
 * Method for setting value of a field to specified numeric value.
 */
public void put(String fieldName, BigDecimal v) {
  if (v == null) {
    putNull(fieldName);
  } else {
    _put(fieldName, numberNode(v));
  }
}
origin: org.codehaus.jackson/jackson-mapper-asl

/**
 * Factory method for getting an instance of JSON null node (which
 * represents literal null value)
 */
public NullNode nullNode() { return NullNode.getInstance(); }
origin: org.codehaus.jackson/jackson-mapper-asl

/**
 * Method for setting value of a field to specified String value.
 */
public void insert(int index, String v) {
  if (v == null) {
    insertNull(index);
  } else {
    _insert(index, textNode(v));
  }
}
origin: org.codehaus.jackson/jackson-mapper-asl

/**
 * Method for setting value of a field to specified binary value
 */
public void insert(int index, byte[] v) {
  if (v == null) {
    insertNull(index);
  } else {
    _insert(index, binaryNode(v));
  }
}
origin: org.codehaus.jackson/jackson-mapper-asl

/**
 * Factory method for constructing a node that represents JSON
 * String value
 */
public TextNode textNode(String text) { return TextNode.valueOf(text); }
origin: org.codehaus.jackson/jackson-mapper-asl

/**
 * 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;
}
origin: org.codehaus.jackson/jackson-mapper-asl

public ArrayNode insertArray(int index)
{
  ArrayNode n  = arrayNode();
  _insert(index, n);
  return n;
}
origin: org.codehaus.jackson/jackson-mapper-asl

/**
 * Factory method for getting an instance of JSON numeric value
 * that expresses given 8-bit value
 */
public NumericNode numberNode(byte v) { return IntNode.valueOf(v); }
origin: org.codehaus.jackson/jackson-mapper-asl

/**
 * Factory method for getting an instance of JSON numeric value
 * that expresses given 64-bit floating point value
 */
public NumericNode numberNode(double v) { return DoubleNode.valueOf(v); }
origin: org.codehaus.jackson/jackson-mapper-asl

/**
 * Factory method for getting an instance of JSON numeric value
 * that expresses given unlimited precision floating point value
 */
public NumericNode numberNode(BigDecimal v) { return DecimalNode.valueOf(v); }
origin: org.codehaus.jackson/jackson-mapper-asl

  @Override
  public double asDouble(double defaultValue) {
    return getDoubleValue();
  }
}
origin: org.codehaus.jackson/jackson-mapper-asl

public static BinaryNode valueOf(byte[] data, int offset, int length)
{
  if (data == null) {
    return null;
  }
  if (length == 0) {
    return EMPTY_BINARY_NODE;
  }
  return new BinaryNode(data, offset, length);
}
origin: org.codehaus.jackson/jackson-mapper-asl

@Override
public JsonNode path(int index)
{
  return MissingNode.getInstance();
}
origin: org.codehaus.jackson/jackson-mapper-asl

protected JsonNode currentNode() {
  if (_closed || _nodeCursor == null) {
    return null;
  }
  return _nodeCursor.currentNode();
}
org.codehaus.jackson.node

Most used classes

  • ObjectNode
    Node that maps to JSON Object structures in JSON content.
  • ArrayNode
    Node class that represents Arrays mapped from Json content.
  • JsonNodeFactory
    Base class that specifies methods for getting access to Node instances (newly constructed, or shared
  • NullNode
    This singleton value class is used to contain explicit JSON null value.
  • TextNode
    Value node that contains a text value.
  • BooleanNode,
  • IntNode,
  • LongNode,
  • ContainerNode,
  • POJONode,
  • BigIntegerNode,
  • DecimalNode,
  • BaseJsonNode,
  • TreeTraversingParser,
  • ValueNode,
  • BinaryNode,
  • ContainerNode$NoNodesIterator,
  • ContainerNode$NoStringsIterator,
  • MissingNode
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now