|
Groovy 1.8.1 | |||||||
| FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectgroovy.json.JsonLexer
public class JsonLexer extends Object
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()
@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 String
|
unescape(String input)
Replace unicode escape and other control characters with real characters |
| Methods inherited from class Object | |
|---|---|
| wait, wait, wait, equals, toString, hashCode, getClass, notify, notifyAll |
| Constructor Detail |
|---|
public JsonLexer(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 String unescape(String input)
input - text
Copyright © 2003-2010 The Codehaus. All rights reserved.