@Deprecated public class JSONWriter extends Object
w.objectBegin().objectItem("name").valueString("qianlei").objectEnd() = {name:"qianlei"}.
| Constructor and Description |
|---|
JSONWriter(OutputStream is,
String charset)
Deprecated.
|
JSONWriter(Writer writer)
Deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
JSONWriter |
arrayBegin()
Deprecated.
array begin.
|
JSONWriter |
arrayEnd()
Deprecated.
array end, return array value.
|
JSONWriter |
objectBegin()
Deprecated.
object begin.
|
JSONWriter |
objectEnd()
Deprecated.
object end.
|
JSONWriter |
objectItem(String name)
Deprecated.
object item.
|
JSONWriter |
valueBoolean(boolean value)
Deprecated.
value.
|
JSONWriter |
valueDouble(double value)
Deprecated.
value.
|
JSONWriter |
valueFloat(float value)
Deprecated.
value.
|
JSONWriter |
valueInt(int value)
Deprecated.
value.
|
JSONWriter |
valueLong(long value)
Deprecated.
value.
|
JSONWriter |
valueNull()
Deprecated.
value.
|
JSONWriter |
valueString(String value)
Deprecated.
value.
|
public JSONWriter(Writer writer)
public JSONWriter(OutputStream is, String charset) throws UnsupportedEncodingException
UnsupportedEncodingExceptionpublic JSONWriter objectBegin() throws IOException
IOExceptionpublic JSONWriter objectEnd() throws IOException
IOExceptionpublic JSONWriter objectItem(String name) throws IOException
name - name.IOExceptionpublic JSONWriter arrayBegin() throws IOException
IOExceptionpublic JSONWriter arrayEnd() throws IOException
IOExceptionpublic JSONWriter valueNull() throws IOException
IOExceptionpublic JSONWriter valueString(String value) throws IOException
value - value.IOExceptionpublic JSONWriter valueBoolean(boolean value) throws IOException
value - value.IOExceptionpublic JSONWriter valueInt(int value) throws IOException
value - value.IOExceptionpublic JSONWriter valueLong(long value) throws IOException
value - value.IOExceptionpublic JSONWriter valueFloat(float value) throws IOException
value - value.IOExceptionpublic JSONWriter valueDouble(double value) throws IOException
value - value.IOExceptionCopyright © 2011–2020 The Apache Software Foundation. All rights reserved.