public interface JSONParseCallback

Known subtypesJSONParser

The event based parser allows parsing without creating an object tree by receiving callbacks to this class.

Methods

public abstract void startBlock(String blockName)Indicates that the parser ran into an opening bracket event {
public abstract void endBlock(String blockName)Indicates that the parser ran into an ending bracket event }
public abstract void startArray(String arrayName)Indicates that the parser ran into an opening bracket event [
public abstract void endArray(String arrayName)Indicates that the parser ran into an ending bracket event ]
public abstract void stringToken(String tok)Submits a token from the JSON data as a java string, this token is always a string value
public abstract void numericToken(double tok)Submits a numeric token from the JSON data
public abstract void booleanToken(boolean tok)Submits a boolean token from the JSON data
public abstract void longToken(long tok)Submits a numeric token from the JSON data
public abstract 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.
public abstract boolean isAlive()This method indicates to the Parser if this Callback is still alive

Method details

startBlock

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

endBlock

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

startArray

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

endArray

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

stringToken

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

numericToken

public abstract void numericToken(double tok)
Submits a numeric token from the JSON data

Parameters

tok double
the token value

booleanToken

public abstract void booleanToken(boolean tok)
Submits a boolean token from the JSON data

Parameters

tok boolean
the token value

longToken

public abstract void longToken(long tok)
Submits a numeric token from the JSON data

keyValue

public abstract 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 String
the key
value String
a string value

isAlive

public abstract boolean isAlive()
This method indicates to the Parser if this Callback is still alive

Returns

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