public interface JSONArtifact
| Modifier and Type | Method and Description |
|---|---|
String |
serialize()
Convert this object into a String of JSON text.
|
String |
serialize(boolean verbose) |
void |
serialize(OutputStream os)
Convert this object into a stream of JSON text.
|
void |
serialize(OutputStream os,
boolean verbose)
Convert this object into a stream of JSON text.
|
void |
serialize(Writer writer)
Convert this object into a stream of JSON text.
|
void |
serialize(Writer writer,
boolean verbose)
Convert this object into a stream of JSON text, specifying verbosity.
|
String |
toString(StringBuffer sb,
int indent,
int incr)
Abstract method to help with recursive formatting of JSON into a String
|
String serialize() throws IOException
IOException - Thrown on IO errors during serialization.String serialize(boolean verbose) throws IOException
verbose - Whether or not to write the JSON text in a verbose format.IOException - Thrown on IO errors during serialization.void serialize(OutputStream os) throws IOException
os - The output stream to serialize data to.IOException - Thrown on IO errors during serialization.void serialize(OutputStream os, boolean verbose) throws IOException
os - The output stream to serialize data to.verbose - Whether or not to write the JSON text in a verbose format.IOException - Thrown on IO errors during serialization.void serialize(Writer writer) throws IOException
writer - The writer which to serialize the JSON text to.IOException - Thrown on IO errors during serialization.void serialize(Writer writer, boolean verbose) throws IOException
writer - The writer which to serialize the JSON text to.verbose - Whether or not to write the JSON text in a verbose format.IOException - Thrown on IO errors during serialization.String toString(StringBuffer sb, int indent, int incr)
sb - Buffer to receive formatted JSON contentindent - The amount of indentation expected in the formatted output.incr - the amount of incremental spacing used for formatted output.Copyright © 2020. All rights reserved.