JSON
Version 1.0

org.codehaus.jackson
Class JsonFactory

java.lang.Object
  extended by 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.
 
Constructor Summary
JsonFactory()
           
 
Method Summary
protected  IOContext createContext(Object srcRef)
           
 JsonGenerator createJsonGenerator(File f, JsonFactory.Encoding enc)
           
 JsonGenerator createJsonGenerator(OutputStream out, JsonFactory.Encoding enc)
           
 JsonGenerator createJsonGenerator(Writer out)
           
 JsonParser createJsonParser(File f)
           
 JsonParser createJsonParser(InputStream in)
           Note: no encoding argument is taken since it can always be auto-detected as suggested by Json RFC.
 JsonParser createJsonParser(Reader r)
           
 JsonParser createJsonParser(URL url)
           
protected  BufferRecycler getBufferRecycler()
           
static InputStream optimizedStreamFromURL(URL url)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JsonFactory

public JsonFactory()
Method Detail

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

JSON
Version 1.0

Apache License, Version 2.0