Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add json omitempty tags to dynamodb.AttributeValue fields #3943

Closed
rittneje opened this issue Jun 6, 2021 · 5 comments
Closed

Add json omitempty tags to dynamodb.AttributeValue fields #3943

rittneje opened this issue Jun 6, 2021 · 5 comments
Labels
feature-request A feature should be added or improved.

Comments

@rittneje
Copy link
Contributor

rittneje commented Jun 6, 2021

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.

@rittneje rittneje added feature-request A feature should be added or improved. needs-triage This issue or PR still needs to be triaged. labels Jun 6, 2021
@rittneje
Copy link
Contributor Author

ping @jasdel @KaibaLopez

@vudh1
Copy link
Contributor

vudh1 commented Apr 22, 2022

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.

@vudh1 vudh1 removed the needs-triage This issue or PR still needs to be triaged. label Apr 22, 2022
@github-actions
Copy link

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.

@github-actions github-actions bot added the closing-soon This issue will automatically close in 4 days unless further comments are made. label Apr 23, 2023
@rittneje
Copy link
Contributor Author

don't close

@github-actions github-actions bot removed the closing-soon This issue will automatically close in 4 days unless further comments are made. label Apr 24, 2023
@lucix-aws lucix-aws closed this as not planned Won't fix, can't repro, duplicate, stale Apr 1, 2024
Copy link

github-actions bot commented Apr 1, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request A feature should be added or improved.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants