1

This line https://github.com/aws/aws-sdk-net/blob/master/sdk/src/Services/DynamoDBv2/Custom/Conversion/SchemaV1.cs#L199 causes null values to not be convertible to strings in the library. The logic seems to conflate lack of value, and the value not being of the given type.

This eventually causes the exception here to be thrown: https://github.com/aws/aws-sdk-net/blob/966617d346169e89a693dae74c5eec5cda0551b2/sdk/src/Services/DynamoDBv2/Custom/Conversion/DynamoDBEntryConversion.cs#L226 with {0} {1} and {2} being DynamoDbNull, DynamoDbNull, and String, respectively.

The base converter class, https://github.com/aws/aws-sdk-net/blob/master/sdk/src/Services/DynamoDBv2/Custom/Conversion/DynamoDBEntryConversion.cs#L608 is internal, so there seems to be no way to set up custom conversion.

Saving a null into DynamoDb using the Object Persistance Api works fine - it's the loading that doesn't work.

How can one store and retrieve an object that contains null values using the Object Persistence Api?

jamesbascle
  • 854
  • 1
  • 10
  • 17

0 Answers0