| Modifier and Type | Field and Description |
|---|---|
| private String | pendingName
The name for the next JSON object value. |
| private JsonElement | product
the JSON element constructed by this writer. |
| private static final JsonPrimitive | SENTINEL_CLOSED
Added to the top of the stack when this writer is closed to cause following ops to fail. |
| private final List | stack
The JsonElements and JsonArrays under modification, outermost to innermost.
|
| private static final Writer |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public JsonWriter | |
| public JsonWriter | |
| public void | close()
Overrides com. Implements java. Flushes and closes this writer and the underlying |
| public JsonWriter | |
| public JsonWriter | |
| public void | flush()
Overrides com. Implements java. Ensures all buffered data is written to the underlying |
| public JsonElement | |
| public JsonWriter | jsonValue(String value)
Overrides com. Writes |
| public JsonWriter | |
| public JsonWriter | |
| private JsonElement | |
| private void | |
| public JsonWriter | |
| public JsonWriter | |
| public JsonWriter | |
| public JsonWriter | |
| public JsonWriter | |
| public JsonWriter | |
| public JsonWriter |
| pendingName | back to summary |
|---|---|
| private String pendingName The name for the next JSON object value. If non-null, the top of the stack is a JsonObject. | |
| product | back to summary |
|---|---|
| private JsonElement product the JSON element constructed by this writer. | |
| SENTINEL_CLOSED | back to summary |
|---|---|
| private static final JsonPrimitive SENTINEL_CLOSED Added to the top of the stack when this writer is closed to cause following ops to fail. | |
| stack | back to summary |
|---|---|
| private final List<JsonElement> stack Hides com. The JsonElements and JsonArrays under modification, outermost to innermost. | |
| UNWRITABLE_WRITER | back to summary |
|---|---|
| private static final Writer UNWRITABLE_WRITER | |
| JsonTreeWriter | back to summary |
|---|---|
| public JsonTreeWriter() | |
| beginArray | back to summary |
|---|---|
| public JsonWriter beginArray() throws IOException Overrides com. Doc from com. Begins encoding a new array. Each call to this method must be paired with a call to
| |
| beginObject | back to summary |
|---|---|
| public JsonWriter beginObject() throws IOException Overrides com. Doc from com. Begins encoding a new object. Each call to this method must be paired with a call to
| |
| close | back to summary |
|---|---|
| public void close() throws IOException Overrides com. Implements java. Doc from com. Flushes and closes this writer and the underlying
| |
| endArray | back to summary |
|---|---|
| public JsonWriter endArray() throws IOException Overrides com. Doc from com. Ends encoding the current array.
| |
| endObject | back to summary |
|---|---|
| public JsonWriter endObject() throws IOException Overrides com. Doc from com. Ends encoding the current object.
| |
| flush | back to summary |
|---|---|
| public void flush() throws IOException Overrides com. Implements java. Doc from com. Ensures all buffered data is written to the underlying
| |
| get | back to summary |
|---|---|
| public JsonElement get() Returns the top level object produced by this writer. | |
| jsonValue | back to summary |
|---|---|
| public JsonWriter jsonValue(String value) throws IOException Overrides com. Doc from com. Writes
| |
| name | back to summary |
|---|---|
| public JsonWriter name(String name) throws IOException Overrides com. Doc from com. Encodes the property name.
| |
| nullValue | back to summary |
|---|---|
| public JsonWriter nullValue() throws IOException Overrides com. Doc from com. Encodes
| |
| peek | back to summary |
|---|---|
| private JsonElement peek() Hides com. Doc from com. Returns the value on the top of the stack. | |
| put | back to summary |
|---|---|
| private void put(JsonElement value) | |
| value | back to summary |
|---|---|
| public JsonWriter value(String value) throws IOException Overrides com. Doc from com. Encodes
| |
| value | back to summary |
|---|---|
| public JsonWriter value(boolean value) throws IOException Overrides com. Doc from com. Encodes
| |
| value | back to summary |
|---|---|
| public JsonWriter value(Boolean value) throws IOException Overrides com. Doc from com. Encodes
| |
| value | back to summary |
|---|---|
| public JsonWriter value(float value) throws IOException Overrides com. Doc from com. Encodes
| |
| value | back to summary |
|---|---|
| public JsonWriter value(double value) throws IOException Overrides com. Doc from com. Encodes
| |
| value | back to summary |
|---|---|
| public JsonWriter value(long value) throws IOException Overrides com. Doc from com. Encodes
| |
| value | back to summary |
|---|---|
| public JsonWriter value(Number value) throws IOException Overrides com. Doc from com. Encodes
| |