aws icon indicating copy to clipboard operation
aws copied to clipboard

[DynamoDB] Marshal & UnMarshal data for DynamoDB

Open tlfbrito opened this issue 5 years ago • 7 comments

This is not a bug report.

I understand that this library implements only the relevant, the most used operations of the AWS SDK, which is a great idea. But most of the times I feel the need of having a Marshaler to convert an array or a JSON document into the format required by DynamoDB and vice versa. Should this be part of this library? or do you think that should be handled by another library? How do you serialize and unserialize data without this helper?

Example: https://aws.amazon.com/pt/blogs/developer/dynamodb-json-and-array-marshaling-for-php/

tlfbrito avatar Jun 30 '20 00:06 tlfbrito

Yes, you're right ! We should find a way to include the AWS Marshaler in this lib. I guess manifest.json could be extended.

For now I map on my own my json document. Hopefully, I don't have many cases :smile:

tyx avatar Jun 30 '20 06:06 tyx

I'm not sure this should be part of the async-aws/dynamo-db package. but a async-aws/simple-dynamo-db could provide such behabior (like we did fo S3: https://async-aws.com/integration/simple-s3.html)

jderusse avatar Jun 30 '20 10:06 jderusse

Excellent idea.

Yeah, see if creating a simple-dynamo-db library makes sense.

Nyholm avatar Jun 30 '20 11:06 Nyholm

Hi guys,

I could have some time (and because I need it now :p) to work on this simple-dynamo-db. The question is around the Marshaler itself. Should we build a new one or should we use AWS one ?

If we want to use AWS one (I'm :+1: to use it), how do you think we could "retrieve" their code ? Like I said, through manifest or you have other idea ?

tyx avatar Jul 09 '20 09:07 tyx

I just give some tries and the unmarshalValue method would require a lot of change. I guess we better make a new one

tyx avatar Jul 09 '20 10:07 tyx

Hm..

Is this a blocker for a 1.0.0 release of dynamo DB client?

Nyholm avatar Oct 09 '20 11:10 Nyholm

I'll release 1.0 of dynamodb now then,

Nyholm avatar Nov 10 '20 12:11 Nyholm