de.undercouch.bson4jackson.serializers
Class BsonSerializer<T>

java.lang.Object
  extended by org.codehaus.jackson.map.JsonSerializer<T>
      extended by de.undercouch.bson4jackson.serializers.BsonSerializer<T>
Direct Known Subclasses:
BsonCalendarSerializer, BsonDateSerializer, BsonJavaScriptSerializer, BsonObjectIdSerializer, BsonRegexSerializer, BsonSymbolSerializer, BsonTimestampSerializer, BsonUuidSerializer

public abstract class BsonSerializer<T>
extends org.codehaus.jackson.map.JsonSerializer<T>

Base class for BSON serializers


Nested Class Summary
 
Nested classes/interfaces inherited from class org.codehaus.jackson.map.JsonSerializer
org.codehaus.jackson.map.JsonSerializer.None
 
Constructor Summary
BsonSerializer()
           
 
Method Summary
abstract  void serialize(T t, BsonGenerator bsonGenerator, org.codehaus.jackson.map.SerializerProvider serializerProvider)
          Serialize the given object using the given BsonGenerator
 void serialize(T t, org.codehaus.jackson.JsonGenerator jsonGenerator, org.codehaus.jackson.map.SerializerProvider serializerProvider)
           
 
Methods inherited from class org.codehaus.jackson.map.JsonSerializer
handledType, serializeWithType
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BsonSerializer

public BsonSerializer()
Method Detail

serialize

public void serialize(T t,
                      org.codehaus.jackson.JsonGenerator jsonGenerator,
                      org.codehaus.jackson.map.SerializerProvider serializerProvider)
               throws java.io.IOException,
                      org.codehaus.jackson.JsonProcessingException
Specified by:
serialize in class org.codehaus.jackson.map.JsonSerializer<T>
Throws:
java.io.IOException
org.codehaus.jackson.JsonProcessingException

serialize

public abstract void serialize(T t,
                               BsonGenerator bsonGenerator,
                               org.codehaus.jackson.map.SerializerProvider serializerProvider)
                        throws java.io.IOException,
                               org.codehaus.jackson.JsonProcessingException
Serialize the given object using the given BsonGenerator

Parameters:
t - The object to serialize
bsonGenerator - The generator to serialize to
serializerProvider - The serialization provider
Throws:
java.io.IOException - If an error occurred writing to the stream
org.codehaus.jackson.JsonProcessingException - If a JSON error occurred