|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectgroovy.json.JsonLexer
public class JsonLexer
The lexer reads JSON tokens in a streaming fashion from the underlying reader.
Constructor Summary | |
---|---|
JsonLexer(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()
|
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 |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public JsonLexer(Reader reader)
LineColumnReader
,
for line and column information, unless it's already an instance of that class.
reader
- underlying readerMethod Detail |
---|
public LineColumnReader getReader()
LineColumnReader
,
to keep track of line and column positions.
public JsonToken nextToken()
public static String unescape(String input)
input
- text
public int skipWhitespace()
public boolean hasNext()
hasNext
in interface Iterator<JsonToken>
public JsonToken next()
next
in interface Iterator<JsonToken>
public void remove()
remove
in interface Iterator<JsonToken>
UnsupportedOperationException
|
Copyright © 2003-2012 The Codehaus. All rights reserved. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |