org.codehaus.jackson
Class JsonFactory
java.lang.Object
org.codehaus.jackson.JsonFactory
public final class JsonFactory
- extends Object
Nested Class Summary |
static class |
JsonFactory.Encoding
Legal JSON content always uses an Unicode encoding from the
small list. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
JsonFactory
public JsonFactory()
createJsonParser
public JsonParser createJsonParser(File f)
throws IOException,
JsonParseException
- Throws:
IOException
JsonParseException
createJsonParser
public JsonParser createJsonParser(URL url)
throws IOException,
JsonParseException
- Throws:
IOException
JsonParseException
createJsonParser
public JsonParser createJsonParser(InputStream in)
throws IOException,
JsonParseException
Note: no encoding argument is taken since it can always be
auto-detected as suggested by Json RFC.
- Throws:
IOException
JsonParseException
createJsonParser
public JsonParser createJsonParser(Reader r)
throws IOException,
JsonParseException
- Throws:
IOException
JsonParseException
createJsonGenerator
public JsonGenerator createJsonGenerator(OutputStream out,
JsonFactory.Encoding enc)
throws IOException
- Throws:
IOException
createJsonGenerator
public JsonGenerator createJsonGenerator(Writer out)
throws IOException
- Throws:
IOException
createJsonGenerator
public JsonGenerator createJsonGenerator(File f,
JsonFactory.Encoding enc)
throws IOException
- Throws:
IOException
createContext
protected IOContext createContext(Object srcRef)
getBufferRecycler
protected BufferRecycler getBufferRecycler()
optimizedStreamFromURL
public static InputStream optimizedStreamFromURL(URL url)
throws IOException
- Throws:
IOException
Apache License, Version 2.0