|
Groovy Documentation | |||||||
FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object groovy.json.JsonLexer
public class JsonLexer
The lexer reads JSON tokens in a streaming fashion from the underlying reader.
Constructor Summary | |
JsonLexer(java.io.Reader reader)
Instanciates a lexer with a reader from which to read JSON tokens. |
Method Summary | |
---|---|
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()
@return the next token from the stream |
void
|
remove()
Method not implemented. |
int
|
skipWhitespace()
Skips all the whitespace characters and moves the cursor to the next non-space character. |
static java.lang.String
|
unescape(java.lang.String input)
Replace unicode escape and other control characters with real characters |
Methods inherited from class java.lang.Object | |
---|---|
java.lang.Object#wait(long), java.lang.Object#wait(long, int), java.lang.Object#wait(), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll() |
Constructor Detail |
---|
public JsonLexer(java.io.Reader reader)
LineColumnReader
,
for line and column information, unless it's already an instance of that class.
reader
- underlying reader
Method Detail |
---|
public LineColumnReader getReader()
LineColumnReader
,
to keep track of line and column positions.
public boolean hasNext()
public JsonToken next()
public JsonToken nextToken()
public void remove()
public int skipWhitespace()
public static java.lang.String unescape(java.lang.String input)
input
- text
Groovy Documentation