| Modifier and Type | Field and Description |
|---|---|
| private int[] | |
| private String[] | |
| private static final Object | |
| private Object[] | stack
The nesting stack.
|
| private int | stackSize
Hides com. stack; the value at stackSize - 1 is the value last placed on
the stack.
|
| private static final Reader |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | beginArray()
Overrides com. Consumes the next token from the JSON stream and asserts that it is the beginning of a new array. |
| public void | beginObject()
Overrides com. Consumes the next token from the JSON stream and asserts that it is the beginning of a new object. |
| public void | close()
Overrides com. Implements java. Closes this JSON reader and the underlying |
| public void | endArray()
Overrides com. Consumes the next token from the JSON stream and asserts that it is the end of the current array. |
| public void | endObject()
Overrides com. Consumes the next token from the JSON stream and asserts that it is the end of the current object. |
| private void | |
| private String | |
| public String | getPath()
Overrides com. Returns a JSONPath in dot-notation to the next (or current) location in the JSON document. |
| public String | getPreviousPath()
Overrides com. Returns a JSONPath in dot-notation to the previous (or current) location in the JSON document. |
| public boolean | hasNext()
Overrides com. Returns true if the current array or object has another element. |
| private String | |
| public boolean | nextBoolean()
Overrides com. Returns the |
| public double | nextDouble()
Overrides com. Returns the |
| public int | nextInt()
Overrides com. Returns the |
| pack-priv JsonElement | |
| public long | nextLong()
Overrides com. Returns the |
| private String | |
| public String | nextName()
Overrides com. Returns the next token, a |
| public void | nextNull()
Overrides com. Consumes the next token from the JSON stream and asserts that it is a literal null. |
| public String | nextString()
Overrides com. Returns the |
| public JsonToken | peek()
Overrides com. Returns the type of the next token without consuming it. |
| private Object | |
| private Object | |
| public void | |
| private void | |
| public void | |
| public String | toString()
Overrides com. Returns a string representation of the object. |
| pathIndices | back to summary |
|---|---|
| private int[] pathIndices | |
| pathNames | back to summary |
|---|---|
| private String[] pathNames | |
| SENTINEL_CLOSED | back to summary |
|---|---|
| private static final Object SENTINEL_CLOSED | |
| stack | back to summary |
|---|---|
| private Object[] stack Hides com. The nesting stack. Using a manual array rather than an ArrayList saves 20%. | |
| stackSize | back to summary |
|---|---|
| private int stackSize Hides com. The used size of | |
| UNREADABLE_READER | back to summary |
|---|---|
| private static final Reader UNREADABLE_READER | |
| JsonTreeReader | back to summary |
|---|---|
| public JsonTreeReader(JsonElement element) | |
| beginArray | back to summary |
|---|---|
| public void beginArray() throws IOException Overrides com. Doc from com. Consumes the next token from the JSON stream and asserts that it is the beginning of a new array.
| |
| beginObject | back to summary |
|---|---|
| public void beginObject() throws IOException Overrides com. Doc from com. Consumes the next token from the JSON stream and asserts that it is the beginning of a new object.
| |
| close | back to summary |
|---|---|
| public void close() throws IOException Overrides com. Implements java. Doc from com. Closes this JSON reader and the underlying Using the JSON reader after it has been closed will throw an
| |
| endArray | back to summary |
|---|---|
| public void endArray() throws IOException Overrides com. Doc from com. Consumes the next token from the JSON stream and asserts that it is the end of the current array.
| |
| endObject | back to summary |
|---|---|
| public void endObject() throws IOException Overrides com. Doc from com. Consumes the next token from the JSON stream and asserts that it is the end of the current object.
| |
| expect | back to summary |
|---|---|
| private void expect(JsonToken expected) throws IOException | |
| getPath | back to summary |
|---|---|
| private String getPath(boolean usePreviousPath) | |
| getPath | back to summary |
|---|---|
| public String getPath() Overrides com. Doc from com. Returns a JSONPath in dot-notation to the next (or current) location in the JSON document. That means:
This method can be useful to add additional context to exception messages before a value is consumed, for example when the peeked token is unexpected.
| |
| getPreviousPath | back to summary |
|---|---|
| public String getPreviousPath() Overrides com. Doc from com. Returns a JSONPath in dot-notation to the previous (or current) location in the JSON document. That means:
This method can be useful to add additional context to exception messages after a value has been consumed.
| |
| hasNext | back to summary |
|---|---|
| public boolean hasNext() throws IOException Overrides com. Doc from com. Returns true if the current array or object has another element.
| |
| locationString | back to summary |
|---|---|
| private String locationString() | |
| nextBoolean | back to summary |
|---|---|
| public boolean nextBoolean() throws IOException Overrides com. Doc from com. Returns the
| |
| nextDouble | back to summary |
|---|---|
| public double nextDouble() throws IOException Overrides com. Doc from com. Returns the
| |
| nextInt | back to summary |
|---|---|
| public int nextInt() throws IOException Overrides com. Doc from com. Returns the
| |
| nextJsonElement | back to summary |
|---|---|
| pack-priv JsonElement nextJsonElement() throws IOException | |
| nextLong | back to summary |
|---|---|
| public long nextLong() throws IOException Overrides com. Doc from com. Returns the
| |
| nextName | back to summary |
|---|---|
| private String nextName(boolean skipName) throws IOException | |
| nextName | back to summary |
|---|---|
| public String nextName() throws IOException Overrides com. Doc from com. Returns the next token, a
| |
| nextNull | back to summary |
|---|---|
| public void nextNull() throws IOException Overrides com. Doc from com. Consumes the next token from the JSON stream and asserts that it is a literal null.
| |
| nextString | back to summary |
|---|---|
| public String nextString() throws IOException Overrides com. Doc from com. Returns the
| |
| peek | back to summary |
|---|---|
| public JsonToken peek() throws IOException Overrides com. Doc from com. Returns the type of the next token without consuming it.
| |
| peekStack | back to summary |
|---|---|
| private Object peekStack() | |
| popStack | back to summary |
|---|---|
private Object popStack()
| |
| promoteNameToValue | back to summary |
|---|---|
| public void promoteNameToValue() throws IOException | |
| push | back to summary |
|---|---|
| private void push(Object newTop) | |
| skipValue | back to summary |
|---|---|
| public void skipValue() throws IOException Overrides com. Doc from com. Skips the next value recursively. This method is intended for use when the JSON token stream contains unrecognized or unhandled values. The behavior depends on the type of the next JSON token:
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides com. Doc from java. Returns a string representation of the object.
Satisfying this method's contract implies a non-
| |