public class BsonObjectIdSerializer extends com.fasterxml.jackson.databind.JsonSerializer<ObjectId>
| Constructor and Description |
|---|
BsonObjectIdSerializer()
Default constructor
|
BsonObjectIdSerializer(boolean useLegacyFormat)
Deprecated.
Legacy ObjectId format is deprecated. Please use the default
constructor to create ObjectIds in the new format.
|
| Modifier and Type | Method and Description |
|---|---|
void |
serialize(ObjectId value,
com.fasterxml.jackson.core.JsonGenerator gen,
com.fasterxml.jackson.databind.SerializerProvider serializerProvider) |
public BsonObjectIdSerializer()
@Deprecated public BsonObjectIdSerializer(boolean useLegacyFormat)
useLegacyFormat - true if the legacy format should be enabledpublic void serialize(ObjectId value, com.fasterxml.jackson.core.JsonGenerator gen, com.fasterxml.jackson.databind.SerializerProvider serializerProvider) throws java.io.IOException
serialize in class com.fasterxml.jackson.databind.JsonSerializer<ObjectId>java.io.IOException