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

java.lang.Object
  extended by com.fasterxml.jackson.databind.JsonSerializer<T>
      extended by de.undercouch.bson4jackson.serializers.BsonSerializer<T>
All Implemented Interfaces:
com.fasterxml.jackson.databind.jsonFormatVisitors.JsonFormatVisitable
Direct Known Subclasses:
BsonCalendarSerializer, BsonDateSerializer, BsonJavaScriptSerializer, BsonObjectIdSerializer, BsonRegexSerializer, BsonSymbolSerializer, BsonTimestampSerializer, BsonUuidSerializer

public abstract class BsonSerializer<T>
extends com.fasterxml.jackson.databind.JsonSerializer<T>

Base class for BSON serializers


Nested Class Summary
 
Nested classes/interfaces inherited from class com.fasterxml.jackson.databind.JsonSerializer
com.fasterxml.jackson.databind.JsonSerializer.None
 
Constructor Summary
BsonSerializer()
           
 
Method Summary
abstract  void serialize(T t, BsonGenerator bsonGenerator, com.fasterxml.jackson.databind.SerializerProvider serializerProvider)
          Serialize the given object using the given BsonGenerator
 void serialize(T t, com.fasterxml.jackson.core.JsonGenerator jsonGenerator, com.fasterxml.jackson.databind.SerializerProvider serializerProvider)
           
 
Methods inherited from class com.fasterxml.jackson.databind.JsonSerializer
acceptJsonFormatVisitor, getDelegatee, handledType, isEmpty, isUnwrappingSerializer, replaceDelegatee, serializeWithType, unwrappingSerializer, usesObjectId
 
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,
                      com.fasterxml.jackson.core.JsonGenerator jsonGenerator,
                      com.fasterxml.jackson.databind.SerializerProvider serializerProvider)
               throws java.io.IOException,
                      com.fasterxml.jackson.core.JsonProcessingException
Specified by:
serialize in class com.fasterxml.jackson.databind.JsonSerializer<T>
Throws:
java.io.IOException
com.fasterxml.jackson.core.JsonProcessingException

serialize

public abstract void serialize(T t,
                               BsonGenerator bsonGenerator,
                               com.fasterxml.jackson.databind.SerializerProvider serializerProvider)
                        throws java.io.IOException,
                               com.fasterxml.jackson.core.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
com.fasterxml.jackson.core.JsonProcessingException - If a JSON error occurred