public class JsonLexer
The lexer reads JSON tokens in a streaming fashion from the underlying reader.
Type Params | Return Type | Name and description |
---|---|---|
|
public LineColumnReader |
getReader() Underlying reader from which to read the JSON tokens. |
|
public boolean |
hasNext() Iterator method to know if another token follows, or if we've reached the end of the stream. |
|
public JsonToken |
next() Iterator method to get the next token of the stream. |
|
public JsonToken |
nextToken()
|
|
public void |
remove() Method not implemented. |
|
public int |
skipWhitespace() Skips all the whitespace characters and moves the cursor to the next non-space character. |
|
public static String |
unescape(String input) Replace unicode escape and other control characters with real characters |
Instantiates a lexer with a reader from which to read JSON tokens.
Under the hood, the reader is wrapped in a LineColumnReader
,
for line and column information, unless it's already an instance of that class.
reader
- underlying reader Underlying reader from which to read the JSON tokens.
This reader is an instance of LineColumnReader
,
to keep track of line and column positions.
Iterator method to know if another token follows, or if we've reached the end of the stream.
Iterator method to get the next token of the stream.
Method not implemented.
Skips all the whitespace characters and moves the cursor to the next non-space character.
Copyright © 2003-2021 The Apache Software Foundation. All rights reserved.