public class JSONFactory
extends java.lang.Object
JSONReader
or JSONWriter
.Modifier and Type | Field and Description |
---|---|
private static JSONFactory |
INSTANCE |
Modifier | Constructor and Description |
---|---|
private |
JSONFactory() |
Modifier and Type | Method and Description |
---|---|
static JSONFactory |
instance()
Gets an instance of JSONFactory.
|
JSONReader |
makeReader(java.io.Reader reader)
Creates a new
JSONReader from a reader. |
JSONWriter |
makeWriter(java.io.Writer writer)
Creates a new
JSONWriter from a writer |
private static final JSONFactory INSTANCE
public static JSONFactory instance()
public JSONReader makeReader(java.io.Reader reader) throws JSONException
JSONReader
from a reader.reader
- - the reader to read fromJSONReader
JSONException
- if reader cannot be readpublic JSONWriter makeWriter(java.io.Writer writer)
JSONWriter
from a writerwriter
- - the writer to write toJSONWriter