|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.google.api.client.json.JsonGenerator
public abstract class JsonGenerator
Abstract low-level JSON serializer.
Implementation has no fields and therefore thread-safe, but sub-classes are not necessarily thread-safe.
Constructor Summary | |
---|---|
JsonGenerator()
|
Method Summary | |
---|---|
abstract void |
close()
Closes the serializer and the underlying output stream or writer, and releases any memory associated with it. |
abstract void |
flush()
Flushes any buffered content to the underlying output stream or writer. |
abstract JsonFactory |
getFactory()
Returns the JSON factory from which this generator was created. |
void |
serialize(Object value)
Serializes the given JSON value object. |
abstract void |
writeBoolean(boolean state)
Writes a literal JSON boolean value ('true' or 'false'). |
abstract void |
writeEndArray()
Writes a JSON end array character ']'. |
abstract void |
writeEndObject()
Writes a JSON end object character '}'. |
abstract void |
writeFieldName(String name)
Writes a JSON quoted field name. |
abstract void |
writeNull()
Writes a literal JSON null value. |
abstract void |
writeNumber(BigDecimal v)
Writes a JSON big decimal value. |
abstract void |
writeNumber(BigInteger v)
Writes a JSON big integer value. |
abstract void |
writeNumber(double v)
Writes a JSON double value. |
abstract void |
writeNumber(float v)
Writes a JSON float value. |
abstract void |
writeNumber(int v)
Writes a JSON int value. |
abstract void |
writeNumber(long v)
Writes a JSON long value. |
abstract void |
writeNumber(String encodedValue)
Writes a JSON numeric value that has already been encoded properly. |
abstract void |
writeStartArray()
Writes a JSON start array character '['. |
abstract void |
writeStartObject()
Writes a JSON start object character '{'. |
abstract void |
writeString(String value)
Writes a JSON quoted string value. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public JsonGenerator()
Method Detail |
---|
public abstract JsonFactory getFactory()
public abstract void flush() throws IOException
IOException
- if failedpublic abstract void close() throws IOException
IOException
- if failedpublic abstract void writeStartArray() throws IOException
IOException
- if failedpublic abstract void writeEndArray() throws IOException
IOException
- if failedpublic abstract void writeStartObject() throws IOException
IOException
- if failedpublic abstract void writeEndObject() throws IOException
IOException
- if failedpublic abstract void writeFieldName(String name) throws IOException
IOException
- if failedpublic abstract void writeNull() throws IOException
IOException
- if failedpublic abstract void writeString(String value) throws IOException
IOException
- if failedpublic abstract void writeBoolean(boolean state) throws IOException
IOException
- if failedpublic abstract void writeNumber(int v) throws IOException
IOException
- if failedpublic abstract void writeNumber(long v) throws IOException
IOException
- if failedpublic abstract void writeNumber(BigInteger v) throws IOException
IOException
- if failedpublic abstract void writeNumber(float v) throws IOException
IOException
- if failedpublic abstract void writeNumber(double v) throws IOException
IOException
- if failedpublic abstract void writeNumber(BigDecimal v) throws IOException
IOException
- if failedpublic abstract void writeNumber(String encodedValue) throws IOException
IOException
- if failedpublic final void serialize(Object value) throws IOException
value
- JSON value object or null
to ignore
IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |