Class ConversionSchemas


  • public final class ConversionSchemas
    extends Object
    Pre-defined strategies for mapping between Java types and DynamoDB types.
    • Field Detail

      • V1

        public static final ConversionSchema V1
        The V1 schema mapping, which retains strict backwards compatibility with the original DynamoDB data model. In particular, it marshals Java Booleans as DynamoDB Numbers rather than the newer Boolean type, and does not support marshaling Lists or Maps. It can unmarshal values written in newer formats to ease migration.

        Use me if you have other code still using an old version of the SDK that does not understand the new List and Map types and want to ensure that you don't accidentally start writing values using these types.

      • V2_COMPATIBLE

        public static final ConversionSchema V2_COMPATIBLE
        A V2 conversion schema which retains backwards compatibility with the V1 conversion schema for existing DynamoDB types, but adds the ability to marshall recursive structures using the new List and Map types. This is currently the default conversion schema.
      • V2

        public static final ConversionSchema V2
        The native V2 conversion schema. This schema breaks compatibility with older versions of the mapper that only support the V1 schema by storing booleans as native DynamoDB Booleans rather than as a 1 or 0 in a DynamoDB Number. Switching to the V2 schema will prevent older versions of the mapper from reading items you write that contain booleans.