Example usage for Java com.google.gson.stream JsonWriter fields, constructors, methods, implement or subclass
The text is from its open source code.
JsonWriter(Writer out) Creates a new instance that writes a JSON-encoded stream to out . |
JsonWriter | beginArray() Begins encoding a new array. |
JsonWriter | beginObject() Begins encoding a new object. |
void | close() Flushes and closes this writer and the underlying Writer . |
JsonWriter | endArray() Ends encoding the current array. |
JsonWriter | endObject() Ends encoding the current object. |
void | flush() Ensures all buffered data is written to the underlying Writer and flushes that writer. |
boolean | getSerializeNulls() Returns true if object members are serialized when their value is null. |
JsonWriter | jsonValue(String value) Writes value directly to the writer without quoting or escaping. |
JsonWriter | name(String name) Encodes the property name. |
JsonWriter | nullValue() Encodes null . |
void | setHtmlSafe(boolean htmlSafe) Configure this writer to emit JSON that's safe for direct inclusion in HTML and XML documents. |
void | setIndent(String indent) Sets the indentation string to be repeated for each level of indentation in the encoded document. |
void | setLenient(boolean lenient) Configure this writer to relax its syntax rules. |
void | setSerializeNulls(boolean serializeNulls) Sets whether object members are serialized when their value is null. |
JsonWriter | value(String value) Encodes value . |
JsonWriter | value(boolean value) Encodes value . |
JsonWriter | value(Boolean value) Encodes value . |
JsonWriter | value(double value) Encodes value . |
JsonWriter | value(long value) Encodes value . |
JsonWriter | value(Number value) Encodes value . |