de.undercouch.bson4jackson.serializers
Class BsonUuidSerializer

java.lang.Object
  extended by org.codehaus.jackson.map.JsonSerializer<T>
      extended by de.undercouch.bson4jackson.serializers.BsonSerializer<java.util.UUID>
          extended by de.undercouch.bson4jackson.serializers.BsonUuidSerializer

public class BsonUuidSerializer
extends BsonSerializer<java.util.UUID>

Serializer for writing UUIDs as BSON binary fields with UUID subtype. Can only be used in conjunction with the BsonGenerator.


Nested Class Summary
 
Nested classes/interfaces inherited from class org.codehaus.jackson.map.JsonSerializer
org.codehaus.jackson.map.JsonSerializer.None
 
Constructor Summary
BsonUuidSerializer()
           
 
Method Summary
 void serialize(java.util.UUID value, BsonGenerator bgen, org.codehaus.jackson.map.SerializerProvider provider)
          Serialize the given object using the given BsonGenerator
 
Methods inherited from class de.undercouch.bson4jackson.serializers.BsonSerializer
serialize
 
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

BsonUuidSerializer

public BsonUuidSerializer()
Method Detail

serialize

public void serialize(java.util.UUID value,
                      BsonGenerator bgen,
                      org.codehaus.jackson.map.SerializerProvider provider)
               throws java.io.IOException
Description copied from class: BsonSerializer
Serialize the given object using the given BsonGenerator

Specified by:
serialize in class BsonSerializer<java.util.UUID>
Parameters:
value - The object to serialize
bgen - The generator to serialize to
provider - The serialization provider
Throws:
java.io.IOException - If an error occurred writing to the stream
org.codehaus.jackson.JsonProcessingException - If a JSON error occurred