swift-aws-lambda-events icon indicating copy to clipboard operation
swift-aws-lambda-events copied to clipboard

Update DynamoDB.Decoder to handle binary strings

Open gregggreg opened this issue 1 year ago • 1 comments

DynamoDBEvent.Decoder isn't currently handling the case where .binary attributes are base64encoded strings and throws an error

Motivation:

If you try to use DynamoDBEvent.Decoder on binary values, it throws an error saying it is expecting the value to be a string

Modifications:

Decoding string values now handles the case where they are .binary as well

Result:

If you have a DynamoDB record with binary values, you will be able to use DynamoDBEvent.Decoder to properly decode it without an error being thrown

gregggreg avatar Aug 12 '24 23:08 gregggreg

Thank you @gregggreg Can you add a unit test to cover this change ?

sebsto avatar Nov 07 '24 21:11 sebsto

Hello @gregggreg DO you think you can find a bit of time to add a unit test for this PR ?

sebsto avatar Jun 27 '25 07:06 sebsto

Closing in favor of https://github.com/awslabs/swift-aws-lambda-events/pull/103

sebsto avatar Oct 22 '25 19:10 sebsto