Class Json.DefaultHandler

  • Enclosing class:
    Json

    static class Json.DefaultHandler
    extends JsonHandler<java.util.List<java.lang.Object>,​java.util.Map<java.lang.String,​java.lang.Object>>
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.lang.Object value  
    • Constructor Summary

      Constructors 
      Constructor Description
      DefaultHandler()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void endArray​(java.util.List<java.lang.Object> array)
      Indicates the end of an array in the JSON input.
      void endArrayValue​(java.util.List<java.lang.Object> array)
      Indicates the end of an array element in the JSON input.
      void endBoolean​(boolean bool)
      Indicates the end of a boolean literal (true or false) in the JSON input.
      void endNull()
      Indicates the end of a null literal in the JSON input.
      void endNumber​(java.lang.String string)
      Indicates the end of a number in the JSON input.
      void endObject​(java.util.Map<java.lang.String,​java.lang.Object> object)
      Indicates the end of an object in the JSON input.
      void endObjectValue​(java.util.Map<java.lang.String,​java.lang.Object> object, java.lang.String name)
      Indicates the end of an object member value in the JSON input.
      void endString​(java.lang.String string)
      Indicates the end of a string in the JSON input.
      (package private) java.lang.Object getValue()  
      java.util.List<java.lang.Object> startArray()
      Indicates the beginning of an array in the JSON input.
      java.util.Map<java.lang.String,​java.lang.Object> startObject()
      Indicates the beginning of an object in the JSON input.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • value

        private java.lang.Object value
    • Constructor Detail

      • DefaultHandler

        DefaultHandler()
    • Method Detail

      • startArray

        public java.util.List<java.lang.Object> startArray()
        Description copied from class: JsonHandler
        Indicates the beginning of an array in the JSON input. This method will be called when reading the opening square bracket character ('[').

        This method may return an object to handle subsequent parser events for this array. This array handler will then be provided in all calls to startArrayValue(), endArrayValue(), and endArray() for this array.

        Overrides:
        startArray in class JsonHandler<java.util.List<java.lang.Object>,​java.util.Map<java.lang.String,​java.lang.Object>>
        Returns:
        a handler for this array, or null if not needed
      • startObject

        public java.util.Map<java.lang.String,​java.lang.Object> startObject()
        Description copied from class: JsonHandler
        Indicates the beginning of an object in the JSON input. This method will be called when reading the opening curly bracket character ('{').

        This method may return an object to handle subsequent parser events for this object. This object handler will be provided in all calls to startObjectName(), endObjectName(), startObjectValue(), endObjectValue(), and endObject() for this object.

        Overrides:
        startObject in class JsonHandler<java.util.List<java.lang.Object>,​java.util.Map<java.lang.String,​java.lang.Object>>
        Returns:
        a handler for this object, or null if not needed
      • endNull

        public void endNull()
        Description copied from class: JsonHandler
        Indicates the end of a null literal in the JSON input. This method will be called after reading the last character of the literal.
        Overrides:
        endNull in class JsonHandler<java.util.List<java.lang.Object>,​java.util.Map<java.lang.String,​java.lang.Object>>
      • endBoolean

        public void endBoolean​(boolean bool)
        Description copied from class: JsonHandler
        Indicates the end of a boolean literal (true or false) in the JSON input. This method will be called after reading the last character of the literal.
        Overrides:
        endBoolean in class JsonHandler<java.util.List<java.lang.Object>,​java.util.Map<java.lang.String,​java.lang.Object>>
        Parameters:
        bool - the parsed boolean value
      • endString

        public void endString​(java.lang.String string)
        Description copied from class: JsonHandler
        Indicates the end of a string in the JSON input. This method will be called after reading the closing double quote character ('"').
        Overrides:
        endString in class JsonHandler<java.util.List<java.lang.Object>,​java.util.Map<java.lang.String,​java.lang.Object>>
        Parameters:
        string - the parsed string
      • endNumber

        public void endNumber​(java.lang.String string)
        Description copied from class: JsonHandler
        Indicates the end of a number in the JSON input. This method will be called after reading the last character of the number.
        Overrides:
        endNumber in class JsonHandler<java.util.List<java.lang.Object>,​java.util.Map<java.lang.String,​java.lang.Object>>
        Parameters:
        string - the parsed number string
      • endArray

        public void endArray​(java.util.List<java.lang.Object> array)
        Description copied from class: JsonHandler
        Indicates the end of an array in the JSON input. This method will be called after reading the closing square bracket character (']').
        Overrides:
        endArray in class JsonHandler<java.util.List<java.lang.Object>,​java.util.Map<java.lang.String,​java.lang.Object>>
        Parameters:
        array - the array handler returned from JsonHandler.startArray(), or null if not provided
      • endObject

        public void endObject​(java.util.Map<java.lang.String,​java.lang.Object> object)
        Description copied from class: JsonHandler
        Indicates the end of an object in the JSON input. This method will be called after reading the closing curly bracket character ('}').
        Overrides:
        endObject in class JsonHandler<java.util.List<java.lang.Object>,​java.util.Map<java.lang.String,​java.lang.Object>>
        Parameters:
        object - the object handler returned from JsonHandler.startObject(), or null if not provided
      • endArrayValue

        public void endArrayValue​(java.util.List<java.lang.Object> array)
        Description copied from class: JsonHandler
        Indicates the end of an array element in the JSON input. This method will be called after reading the last character of the element value, just after the end method for the specific element type (like endString(), endNumber(), etc.).
        Overrides:
        endArrayValue in class JsonHandler<java.util.List<java.lang.Object>,​java.util.Map<java.lang.String,​java.lang.Object>>
        Parameters:
        array - the array handler returned from JsonHandler.startArray(), or null if not provided
      • endObjectValue

        public void endObjectValue​(java.util.Map<java.lang.String,​java.lang.Object> object,
                                   java.lang.String name)
        Description copied from class: JsonHandler
        Indicates the end of an object member value in the JSON input. This method will be called after reading the last character of the member value, just after the end method for the specific member type (like endString(), endNumber(), etc.).
        Overrides:
        endObjectValue in class JsonHandler<java.util.List<java.lang.Object>,​java.util.Map<java.lang.String,​java.lang.Object>>
        Parameters:
        object - the object handler returned from JsonHandler.startObject(), or null if not provided
        name - the parsed member name
      • getValue

        java.lang.Object getValue()