class JsonScanner extends java.lang.Object
Parses the string representation of a JSON object into a set of JsonToken-derived objects.
| Modifiers | Name | Description |
|---|---|---|
private enum |
JsonScanner.NumberState |
|
private enum |
JsonScanner.RegularExpressionState |
| Constructor and description |
|---|
JsonScanner
(java.io.Reader reader)Constructs a a new JSONScanner that produces values scanned from specified JSONBuffer. |
| Type Params | Return Type | Name and description |
|---|---|---|
|
public JsonToken |
nextToken()Finds and returns the next complete token from this scanner. |
|
protected int |
readCharacter() |
|
private JsonToken |
scanNumber(char firstChar) |
|
private JsonToken |
scanRegularExpression()Reads RegularExpressionToken from source. |
|
private JsonToken |
scanString(char quoteCharacter) |
|
private JsonToken |
scanUnquotedString(char startChar)Reads StringToken from source. |
| Methods inherited from class | Name |
|---|---|
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() |
Constructs a a new JSONScanner that produces values scanned from specified JSONBuffer.
reader - A reader to be scanned. Finds and returns the next complete token from this scanner. If scanner reached the end of the source, it will return a token with
JSONTokenType.END_OF_FILE type.
Reads RegularExpressionToken from source. The following variants of lexemes are possible:
/pattern/ /\(pattern\)/ /pattern/imsOptions can include 'i','m','x','s'
Reads StringToken from source.