Interface JsonContentHandler


  • public interface JsonContentHandler
    Json event consumer. It is used together with Traversal parser to generate events corresponding to json tree. Each method can throw StopTraverse exception to regularry stop processing.
    Author:
    antons
    • Method Detail

      • contextInfo

        String contextInfo()
        Help information for parser. It is used in case of error.
        Returns:
        information about state of parsing.
      • startDocument

        void startDocument()
        Start of the json document event.
      • endDocument

        void endDocument()
        End of the json document event.
      • startArray

        void startArray()
        Start of the json array event.
      • endArray

        void endArray()
        End of the json array event.
      • startObject

        void startObject()
        Start of the json object event.
      • endObject

        void endObject()
        End of the json object event.
      • valueSeparator

        void valueSeparator()
        Value separator json event.
      • nameSeparator

        void nameSeparator()
        Name separaton json event.
      • literal

        void literal​(JsonLiteralImpl literal)
        Json literal event.
        Parameters:
        literal - provided literal
      • whiteSpace

        void whiteSpace​(String content,
                        int offset,
                        int length)
        white space json event
        Parameters:
        content - String where whitespace is located
        offset - start position of white space in content
        length - length of white space.