public class JSONWriter extends Object
| Constructor and Description |
|---|
JSONWriter(Writer out) |
| Modifier and Type | Method and Description |
|---|---|
void |
beginAttribute(String key) |
void |
beginList() |
void |
beginListAttribute(String key) |
void |
beginObject() |
void |
beginObjectAttribute(String key) |
void |
close() |
void |
endList() |
void |
endObject() |
static String |
escapeString(String value) |
void |
write(boolean value) |
void |
write(int value) |
void |
write(long value) |
void |
write(String value) |
void |
writeAttribute(String key,
boolean value) |
void |
writeAttribute(String key,
int value) |
void |
writeAttribute(String key,
long value) |
void |
writeAttribute(String key,
String value) |
void |
writeStringList(Collection<String> values) |
void |
writeStringListAttribute(String key,
Collection<String> values) |
public JSONWriter(Writer out)
public void beginObject()
throws IOException
IOExceptionpublic void beginObjectAttribute(String key) throws IOException
IOExceptionpublic void endObject()
throws IOException
IOExceptionpublic void beginList()
throws IOException
IOExceptionpublic void beginListAttribute(String key) throws IOException
IOExceptionpublic void endList()
throws IOException
IOExceptionpublic void writeStringList(Collection<String> values) throws IOException
IOExceptionpublic void writeStringListAttribute(String key, Collection<String> values) throws IOException
IOExceptionpublic void beginAttribute(String key) throws IOException
IOExceptionpublic void writeAttribute(String key, int value) throws IOException
IOExceptionpublic void writeAttribute(String key, long value) throws IOException
IOExceptionpublic void writeAttribute(String key, boolean value) throws IOException
IOExceptionpublic void writeAttribute(String key, String value) throws IOException
IOExceptionpublic void write(String value) throws IOException
IOExceptionpublic void write(int value)
throws IOException
IOExceptionpublic void write(long value)
throws IOException
IOExceptionpublic void write(boolean value)
throws IOException
IOExceptionpublic void close()
throws IOException
IOExceptionCopyright © 2018 eu.stamp-project. All rights reserved.