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 TypeMethodDescriptionvoidbooleanToken(boolean tok) Submits a boolean token from the JSON datavoidIndicates that the parser ran into an ending bracket event ]voidIndicates that the parser ran into an ending bracket event }booleanisAlive()This method indicates to the Parser if this Callback is still alivevoidThis method is called when a string key/value pair is detected within the json it is essentially redundant when following string/numeric token.voidlongToken(long tok) Submits a numeric token from the JSON datavoidnumericToken(double tok) Submits a numeric token from the JSON datavoidstartArray(String arrayName) Indicates that the parser ran into an opening bracket event [voidstartBlock(String blockName) Indicates that the parser ran into an opening bracket event {voidstringToken(String tok) Submits a token from the JSON data as a java string, this token is always a string value
-
Method Details
-
startBlock
Indicates that the parser ran into an opening bracket event { -
endBlock
Indicates that the parser ran into an ending bracket event } -
startArray
Indicates that the parser ran into an opening bracket event [ -
endArray
Indicates that the parser ran into an ending bracket event ] -
stringToken
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
-
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
-