com.google.api.client.json.jackson
Class JacksonFactory

java.lang.Object
  extended by com.google.api.client.json.JsonFactory
      extended by com.google.api.client.json.jackson.JacksonFactory

public final class JacksonFactory
extends JsonFactory

Low-level JSON library implementation based on Jackson.

Implementation is thread-safe, and sub-classes must be thread-safe. For maximum efficiency, applications should use a single globally-shared instance of the JSON factory.

Since:
1.3
Author:
Yaniv Inbar

Constructor Summary
JacksonFactory()
           
 
Method Summary
 JsonGenerator createJsonGenerator(OutputStream out, JsonEncoding enc)
          Returns a new instance of a low-level JSON serializer for the given output stream and encoding.
 JsonGenerator createJsonGenerator(Writer writer)
          Returns a new instance of a low-level JSON serializer for the given writer.
 JsonParser createJsonParser(InputStream in)
          Returns a new instance of a low-level JSON parser for the given input stream.
 JsonParser createJsonParser(Reader reader)
          Returns a new instance of a low-level JSON parser for the given reader.
 JsonParser createJsonParser(String value)
          Returns a new instance of a low-level JSON parser for the given string value.
 
Methods inherited from class com.google.api.client.json.JsonFactory
fromInputStream, fromReader, fromString, toByteArray, toPrettyString, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JacksonFactory

public JacksonFactory()
Method Detail

createJsonGenerator

public JsonGenerator createJsonGenerator(OutputStream out,
                                         JsonEncoding enc)
                                  throws IOException
Description copied from class: JsonFactory
Returns a new instance of a low-level JSON serializer for the given output stream and encoding.

Specified by:
createJsonGenerator in class JsonFactory
Parameters:
out - output stream
enc - encoding
Returns:
new instance of a low-level JSON serializer
Throws:
IOException - if failed

createJsonGenerator

public JsonGenerator createJsonGenerator(Writer writer)
                                  throws IOException
Description copied from class: JsonFactory
Returns a new instance of a low-level JSON serializer for the given writer.

Specified by:
createJsonGenerator in class JsonFactory
Parameters:
writer - writer
Returns:
new instance of a low-level JSON serializer
Throws:
IOException - if failed

createJsonParser

public JsonParser createJsonParser(Reader reader)
                            throws IOException
Description copied from class: JsonFactory
Returns a new instance of a low-level JSON parser for the given reader.

Specified by:
createJsonParser in class JsonFactory
Parameters:
reader - reader
Returns:
new instance of a low-level JSON parser
Throws:
IOException - if failed

createJsonParser

public JsonParser createJsonParser(InputStream in)
                            throws IOException
Description copied from class: JsonFactory
Returns a new instance of a low-level JSON parser for the given input stream.

Specified by:
createJsonParser in class JsonFactory
Parameters:
in - input stream
Returns:
new instance of a low-level JSON parser
Throws:
IOException - if failed

createJsonParser

public JsonParser createJsonParser(String value)
                            throws IOException
Description copied from class: JsonFactory
Returns a new instance of a low-level JSON parser for the given string value.

Specified by:
createJsonParser in class JsonFactory
Parameters:
value - string value
Returns:
new instance of a low-level JSON parser
Throws:
IOException - if failed


Copyright © 2011-2012 Google. All Rights Reserved.