public final class JsonWriter extends Object implements Closeable
| Constructor and Description |
|---|
JsonWriter(Writer out) |
| Modifier and Type | Method and Description |
|---|---|
JsonWriter |
beginArray() |
JsonWriter |
beginObject() |
void |
close() |
JsonWriter |
endArray() |
JsonWriter |
endObject() |
void |
flush() |
boolean |
isLenient() |
JsonWriter |
name(String name) |
JsonWriter |
nullValue() |
void |
setIndent(String indent) |
void |
setLenient(boolean lenient) |
JsonWriter |
value(boolean value) |
JsonWriter |
value(double value) |
JsonWriter |
value(long value) |
JsonWriter |
value(Number value) |
JsonWriter |
value(String value) |
public JsonWriter(Writer out)
public void setIndent(String indent)
public void setLenient(boolean lenient)
public boolean isLenient()
public JsonWriter beginArray() throws IOException
IOExceptionpublic JsonWriter endArray() throws IOException
IOExceptionpublic JsonWriter beginObject() throws IOException
IOExceptionpublic JsonWriter endObject() throws IOException
IOExceptionpublic JsonWriter name(String name) throws IOException
IOExceptionpublic JsonWriter value(String value) throws IOException
IOExceptionpublic JsonWriter nullValue() throws IOException
IOExceptionpublic JsonWriter value(boolean value) throws IOException
IOExceptionpublic JsonWriter value(double value) throws IOException
IOExceptionpublic JsonWriter value(long value) throws IOException
IOExceptionpublic JsonWriter value(Number value) throws IOException
IOExceptionpublic void flush()
throws IOException
IOExceptionpublic void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableIOExceptionCopyright © 2008-2013. All Rights Reserved.