private Set<Boolean> unmarshallList(List<AttributeValue> values) {
        Set<Boolean> result = new HashSet<Boolean>();

        for (AttributeValue value : values) {
            Boolean bool;
            if (Boolean.TRUE.equals(value.isNULL())) {
                bool = null;
            } else {
                bool = value.getBOOL();
                if (bool == null) {
                    throw new DynamoDBMappingException(
                            value + " is not a boolean");
                }
            }

            if (!result.add(bool)) {
                throw new DynamoDBMappingException(
                        "Duplicate value (" + bool + ") found in "
                        + values);
            }
        }

        return result;
    }
A special unmarshaller for Set&lt;Boolean>, which the V1 schema stores as
an NS using 0/1 for true/false. In the V2 schema these fall through to
the {@code ObjectSetToListMarshaller} which stores them as an L or BOOLs.
aws-java-sdk-dynamodb/src/main/java/com/amazonaws/services/dynamodbv2/datamodeling/unmarshallers/BooleanSetUnmarshaller.java