Constructor and Description |
---|
JsonLexer(Reader reader)
Instanciates a lexer with a reader from which to read JSON tokens.
|
Modifier and Type | Method and Description |
---|---|
LineColumnReader |
getReader()
Underlying reader from which to read the JSON tokens.
|
boolean |
hasNext()
Iterator method to know if another token follows,
or if we've reached the end of the stream.
|
JsonToken |
next()
Iterator method to get the next token of the stream.
|
JsonToken |
nextToken() |
void |
remove()
Method not implemented.
|
int |
skipWhitespace()
Skips all the whitespace characters and moves the cursor to the next non-space character.
|
static String |
unescape(String input)
Replace unicode escape and other control characters with real characters
|
public JsonLexer(Reader reader)
LineColumnReader
,
for line and column information, unless it's already an instance of that class.reader
- underlying readerpublic LineColumnReader getReader()
LineColumnReader
,
to keep track of line and column positions.public JsonToken nextToken()
public static String unescape(String input)
input
- textpublic int skipWhitespace()
public boolean hasNext()
public JsonToken next()
public void remove()
remove
in interface Iterator<JsonToken>
UnsupportedOperationException