public class JsonWriter extends Writer
| Constructor and Description |
|---|
JsonWriter(Writer writer) |
| Modifier and Type | Method and Description |
|---|---|
JsonWriter |
array() |
JsonWriter |
array(String name) |
void |
close() |
void |
flush() |
Writer |
getWriter() |
JsonWriter |
name(String name) |
JsonWriter |
object() |
JsonWriter |
object(String name) |
JsonWriter |
pop() |
JsonWriter |
set(String name,
Object value) |
void |
setOutputType(OutputType outputType) |
JsonWriter |
value(Object value) |
void |
write(char[] cbuf,
int off,
int len) |
public JsonWriter(Writer writer)
public Writer getWriter()
public void setOutputType(OutputType outputType)
public JsonWriter name(String name) throws IOException
IOExceptionpublic JsonWriter object() throws IOException
IOExceptionpublic JsonWriter array() throws IOException
IOExceptionpublic JsonWriter value(Object value) throws IOException
IOExceptionpublic JsonWriter object(String name) throws IOException
IOExceptionpublic JsonWriter array(String name) throws IOException
IOExceptionpublic JsonWriter set(String name, Object value) throws IOException
IOExceptionpublic JsonWriter pop() throws IOException
IOExceptionpublic void write(char[] cbuf,
int off,
int len)
throws IOException
write in class WriterIOExceptionpublic void flush()
throws IOException
flush in interface Flushableflush in class WriterIOExceptionpublic void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableclose in class WriterIOExceptionCopyright © 2014. All Rights Reserved.