Interface JSONParseCallback

All Known Implementing Classes:
JSONParser

public interface JSONParseCallback
The event based parser allows parsing without creating an object tree by receiving callbacks to this class.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    booleanToken(boolean tok)
    Submits a boolean token from the JSON data
    void
    endArray(String arrayName)
    Indicates that the parser ran into an ending bracket event ]
    void
    endBlock(String blockName)
    Indicates that the parser ran into an ending bracket event }
    boolean
    This method indicates to the Parser if this Callback is still alive
    void
    keyValue(String key, String value)
    This method is called when a string key/value pair is detected within the json it is essentially redundant when following string/numeric token.
    void
    longToken(long tok)
    Submits a numeric token from the JSON data
    void
    numericToken(double tok)
    Submits a numeric token from the JSON data
    void
    startArray(String arrayName)
    Indicates that the parser ran into an opening bracket event [
    void
    startBlock(String blockName)
    Indicates that the parser ran into an opening bracket event {
    void
    Submits a token from the JSON data as a java string, this token is always a string value
  • Method Details

    • startBlock

      void startBlock(String blockName)
      Indicates that the parser ran into an opening bracket event {
    • endBlock

      void endBlock(String blockName)
      Indicates that the parser ran into an ending bracket event }
    • startArray

      void startArray(String arrayName)
      Indicates that the parser ran into an opening bracket event [
    • endArray

      void endArray(String arrayName)
      Indicates that the parser ran into an ending bracket event ]
    • stringToken

      void stringToken(String tok)
      Submits a token from the JSON data as a java string, this token is always a string value
    • numericToken

      void numericToken(double tok)

      Submits a numeric token from the JSON data

      Parameters
      • tok: the token value
    • booleanToken

      void booleanToken(boolean tok)

      Submits a boolean token from the JSON data

      Parameters
      • tok: the token value
    • longToken

      void longToken(long tok)
      Submits a numeric token from the JSON data
    • keyValue

      void keyValue(String key, String value)

      This method is called when a string key/value pair is detected within the json it is essentially redundant when following string/numeric token.

      Parameters
      • key: the key

      • value: a string value

    • isAlive

      boolean isAlive()

      This method indicates to the Parser if this Callback is still alive

      Returns
      Returns:
      true if the Callback is still interested to get the JSON parse events from the JSONParser