public class JSONStructuredWriter extends StructuredWriter
| Constructor and Description |
|---|
JSONStructuredWriter(JSONRenderer r) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
void |
end() |
void |
field(String name,
boolean value) |
void |
field(String name,
Date value) |
void |
field(String name,
Number value) |
void |
field(String name,
String value)
Only allowed in a record.
|
void |
flush() |
void |
list(String name)
Starts a JSON list.
|
void |
record(String name)
Starts a JSON record.
|
size, writepublic JSONStructuredWriter(JSONRenderer r)
public void end()
throws IOException
end in class StructuredWriterIOExceptionpublic void field(String name, String value) throws Exception
field in class StructuredWriterExceptionStructuredWriter.field(java.lang.String, java.lang.String)public void field(String name, boolean value) throws Exception
field in class StructuredWriterExceptionpublic void field(String name, Date value) throws Exception
field in class StructuredWriterExceptionpublic void field(String name, Number value) throws Exception
field in class StructuredWriterExceptionpublic void list(String name) throws Exception
name: [
If this is part of another list or the root then it outputs '[' only.list in class StructuredWriterExceptionStructuredWriter.list(java.lang.String)public void record(String name) throws Exception
record in class StructuredWriterExceptionStructuredWriter.record(java.lang.String)public void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableclose in class WriterIOExceptionpublic void flush()
throws IOException
flush in interface Flushableflush in class WriterIOExceptionCopyright © 2017 etc.to. All rights reserved.