Add json omitempty tags to dynamodb.AttributeValue fields
I am reopening #3884 because it should not have been closed. The workaround presented by @jasdel does not address the stated problem.
Is your feature request related to a problem? Please describe.
When issuing a DynamoDB query, we can get back a LastEvaluatedKey for use when fetching the next page of results. The type of this fields is map[string]*dynamodb.AttributeValue. We would like to send it back to our API client so they can include it in their next request to us. A convenient way to do this is to json marshal and base 64 encode it. However, since *dynamodb.AttributeValue is missing json:",omitempty" tags on all of its fields, the resulting JSON is way larger than it needs to be.
Describe the solution you'd like
I'd like json:",omitempty" to be added to all of the fields of dynamodb.AttributeValue.
Describe alternatives you've considered
We considered making our own struct that is a copy of dynamodb.AttributeValue, but (1) we don't want to have to manually maintain it, and (2) we would have to make a second map and copy all the entries over for this to work.
ping @jasdel @KaibaLopez
Hi all, I have discussed with the team, and we are planning to implement this. However, there is no timeline for this yet, I will comment if we have any update. This feature-request is related to #134 in Go v2 also.
We have noticed this issue has not received attention in 1 year. We will close this issue for now. If you think this is in error, please feel free to comment and reopen the issue.
don't close
Comments on closed issues are hard for our team to see. If you need more assistance, please either tag a team member or open a new issue that references this one. If you wish to keep having a conversation with other community members under this issue feel free to do so.