Interface JsonSerializer<T>

  • Type Parameters:
    T - the type of the object to serialize
    All Superinterfaces:
    Serializer<T,​String>, StringSerializer<T>
    All Known Implementing Classes:
    JacksonSerializer

    public interface JsonSerializer<T>
    extends StringSerializer<T>
    Interface to be used when implementing a custom serializer with JSON representation (encoded as String or BSON).
    Author:
    Andreas Oberhoff
    • Method Detail

      • storeAsBson

        boolean storeAsBson()
        Indicates whether the JSON representation should be encoded as BSON or as string when stored in the MongoDB collection.
        Returns:
        true for BSON encoding or false for string encoding