Interface JsonNode

  • All Known Implementing Classes:
    JsonFieldFormat, JsonWrapper

    public interface JsonNode
    An interface implemented by any JSON segment or field.
    Since:
    2.0
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static char ARRAY
      JSON array type
      static char BOOLEAN
      JSON boolean type
      static char NUMBER
      JSON number type
      static char OBJECT
      JSON object type
      static char STRING
      JSON string type
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      int getJsonArrayIndex()
      Returns the index of this node in its parent array, or -1 if not applicable (i.e. its parent is an object).
      java.lang.String getJsonName()
      Returns the JSON field name.
      char getJsonType()
      Returns the type of node.
      java.lang.String getName()
      Returns the field name.
      boolean isJsonArray()
      Returns whether this node is a JSON array.
      boolean isNillable()
      Returns whether this node may be explicitly set to null.
    • Method Detail

      • getName

        java.lang.String getName()
        Returns the field name.
        Returns:
        the field name
      • getJsonName

        java.lang.String getJsonName()
        Returns the JSON field name.
        Returns:
        the JSON field name
      • getJsonType

        char getJsonType()
        Returns the type of node. If isJsonArray() is true, this method returns the component type of the array.
        Returns:
        the node type
      • isJsonArray

        boolean isJsonArray()
        Returns whether this node is a JSON array.
        Returns:
        true if this node a JSON array, false otherwise
      • getJsonArrayIndex

        int getJsonArrayIndex()
        Returns the index of this node in its parent array, or -1 if not applicable (i.e. its parent is an object).
        Returns:
        the index of this node in its parent array
      • isNillable

        boolean isNillable()
        Returns whether this node may be explicitly set to null.
        Returns:
        true if this node value may be set to null, false otherwise