public interface JSONParseListener
Modifier and Type | Method and Description |
---|---|
boolean |
abort()
returns whether the parsing can end at this time
|
void |
charRead(int index,
char character)
A character has been read
|
void |
elemEnded(int commaIndex,
char character)
An element has ended
|
void |
elemStarted(int commaIndex,
char character)
An element has started
|
void |
ended()
Called when the parsing ends.
|
void |
endingBracket(int index,
char character)
The level has changed
|
void |
keyValueSeparation(int colonIndex,
char character)
A key has ended and a value has started
|
void |
openingBracket(int index,
char character)
Indicates that the initial bracket has been reached
|
void |
started()
Called when the parsing starts.
|
void charRead(int index, char character) throws IllegalStateException
index
- the index of the charactercharacter
- the read characterIllegalStateException
- if this is called before started or between started and endedvoid elemStarted(int commaIndex, char character) throws IllegalStateException
commaIndex
- the index of the commacharacter
- the character that started the elementIllegalStateException
- if this is called before started or between started and endedvoid elemEnded(int commaIndex, char character) throws IllegalStateException, ParseException
commaIndex
- the index of the commacharacter
- the character that ended the elementIllegalStateException
- if this is called before started or between started and endedParseException
- if there was a problem with the elementvoid keyValueSeparation(int colonIndex, char character) throws IllegalStateException, ParseException, ClassCastException
colonIndex
- the index of the commacharacter
- the character that split the elementIllegalStateException
- if this is called before started or between started and endedParseException
- if there was a problem with the keyClassCastException
- if the key is not of the JSONString type, or a similar error occurs.void openingBracket(int index, char character) throws IllegalStateException, ParseException
index
- the location of the bracketcharacter
- the bracket characterIllegalStateException
- if this is called before started or between started and endedParseException
- if there bracket was the wrong onevoid endingBracket(int index, char character) throws IllegalStateException, ParseException
index
- the location of the changecharacter
- the character used in the changeIllegalStateException
- if this is called before started or between started and endedParseException
- if there bracket was the wrong oneboolean abort() throws IllegalStateException
IllegalStateException
- if this is called before started or between started and endedvoid ended() throws IllegalStateException, ParseException
IllegalStateException
- if this is called before started or between started and endedParseException
- if there was an error with the parsingvoid started() throws IllegalStateException
IllegalStateException
- if this is called before started or between started and ended