com.ibm.json.java
Interface JSONArtifact
All known implementing classes:
- public interface JSONArtifact
Method Summary
Modifier and Type | Method and Description |
---|---|
|
serialize()
Convert this object into a String of JSON text.
|
|
serialize(boolean verbose)
Convert this object into a String of JSON text, specifying verbosity.
|
|
serialize(java.io.OutputStream os)
Convert this object into a stream of JSON text.
|
|
serialize(java.io.OutputStream os,boolean verbose)
Convert this object into a stream of JSON text.
|
|
serialize(java.io.Writer writer)
Convert this object into a stream of JSON text.
|
|
serialize(java.io.Writer writer,boolean verbose)
Convert this object into a stream of JSON text, specifying verbosity.
|
Method Detail
serialize
- void serialize(java.io.OutputStream os)
- throws java.io.IOException
Convert this object into a stream of JSON text. Same as calling serialize(os,false);
Note that encoding is always written as UTF-8, as per JSON spec.
Parameters:
os
- The output stream to serialize data to. Throws:
java.io.IOException
- Thrown on IO errors during serialization. serialize
- void serialize(java.io.OutputStream os,
- boolean verbose)
- throws java.io.IOException
Convert this object into a stream of JSON text. Same as calling serialize(writer,false);
Note that encoding is always written as UTF-8, as per JSON spec.
Parameters:
os
- The output stream to serialize data to. verbose
- Whether or not to write the JSON text in a verbose format. Throws:
java.io.IOException
- Thrown on IO errors during serialization. serialize
- void serialize(java.io.Writer writer)
- throws java.io.IOException
Convert this object into a stream of JSON text. Same as calling serialize(writer,false);
Parameters:
writer
- The writer which to serialize the JSON text to. Throws:
java.io.IOException
- Thrown on IO errors during serialization. serialize
- void serialize(java.io.Writer writer,
- boolean verbose)
- throws java.io.IOException
Convert this object into a stream of JSON text, specifying verbosity.
Parameters:
writer
- The writer which to serialize the JSON text to. Throws:
java.io.IOException
- Thrown on IO errors during serialization. serialize
- java.lang.String serialize(boolean verbose)
- throws java.io.IOException
Convert this object into a String of JSON text, specifying verbosity.
Parameters:
verbose
- Whether or not to serialize in compressed for formatted Strings. Throws:
java.io.IOException
- Thrown on IO errors during serialization. serialize
- java.lang.String serialize()
- throws java.io.IOException
Convert this object into a String of JSON text. Same as serialize(false);
Throws:
java.io.IOException
- Thrown on IO errors during serialization.