| Constructor and Description |
|---|
JSONWriter(Writer pw) |
| Modifier and Type | Method and Description |
|---|---|
JSONWriter |
array() |
JSONWriter |
endArray() |
JSONWriter |
endObject() |
void |
flush() |
JSONWriter |
key(String key) |
JSONWriter |
object() |
JSONWriter |
value(boolean b) |
JSONWriter |
value(double d) |
JSONWriter |
value(int i) |
JSONWriter |
value(long l) |
JSONWriter |
value(Object value) |
public JSONWriter(Writer pw)
public JSONWriter object() throws IOException
IOExceptionpublic JSONWriter endObject() throws IOException
IOExceptionpublic JSONWriter array() throws IOException
IOExceptionpublic JSONWriter endArray() throws IOException
IOExceptionpublic JSONWriter key(String key) throws IOException
IOExceptionpublic JSONWriter value(boolean b) throws IOException
IOExceptionpublic JSONWriter value(double d) throws IOException
IOExceptionpublic JSONWriter value(int i) throws IOException
IOExceptionpublic JSONWriter value(long l) throws IOException
IOExceptionpublic JSONWriter value(Object value) throws IOException
IOExceptionpublic void flush()
throws IOException
IOException - when the underlying writer throws an exception.Writer.flush()Copyright © 2006–2021 The Apache Software Foundation. All rights reserved.