-
Notifications
You must be signed in to change notification settings - Fork 656
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
attributevalue.UnmarshalListOfMaps doesn't support json key diff from struct field name #2574
Closed
2 tasks done
Comments
tsesck
added
bug
This issue is a bug.
needs-triage
This issue or PR still needs to be triaged.
labels
Mar 24, 2024
tsesck
changed the title
attributevalue.UnmarshalListOfMaps doesn't support json key diff from struct member
attributevalue.UnmarshalListOfMaps doesn't support json key diff from struct field name
Mar 24, 2024
type MyStruct struct {
MovieTitle string `dynamodbav:"movie_title"`
} |
lucix-aws
added
guidance
Question that needs advice or information.
closing-soon
This issue will automatically close in 4 days unless further comments are made.
and removed
bug
This issue is a bug.
needs-triage
This issue or PR still needs to be triaged.
labels
Mar 25, 2024
@lucix-aws It worked. Thanks. |
This issue is now closed. Comments on closed issues are hard for our team to see. |
replacing json with dynamodbav worked. thanks. |
lucix-aws
removed
guidance
Question that needs advice or information.
closing-soon
This issue will automatically close in 4 days unless further comments are made.
labels
Mar 25, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Acknowledgements
go get -u github.com/aws/aws-sdk-go-v2/...
)Describe the bug
type MyStruct struct {
MovieTitle string.
json:"movie_title"
}
var mystructs []MyStruct
When I run attributevalue.UnmarshalListOfMaps(scanOutput.Items, &mystructs), all MovieTitles are empty. If I change the field to Movie_Title, then it works
Expected Behavior
It used to work in v1 when I use
dynamodbattribute.UnmarshalListOfMaps
Current Behavior
type MyStruct struct {
MovieTitle string.
json:"movie_title"
}
var mystruct MyStruct
When I run attributevalue.UnmarshalListOfMaps(scanOutput.Items, &mystruct), MovieTitle is empty. If I change the field to Movie_Title, then it works
Reproduction Steps
type MyStruct struct {
MovieTitle string.
json:"movie_title"
}
var mystruct MyStruct
When I run attributevalue.UnmarshalListOfMaps(scanOutput.Items, &mystruct), MovieTitle is empty. If I change the field to Movie_Title, then it works
Possible Solution
No response
Additional Information/Context
No response
AWS Go SDK V2 Module Versions Used
$ go mod graph | grep github.com/aws
main github.com/aws/[email protected]
main github.com/aws/aws-sdk-go-v2/[email protected]
main github.com/aws/aws-sdk-go-v2/[email protected]
main github.com/aws/aws-sdk-go-v2/feature/dynamodb/[email protected]
main github.com/aws/aws-sdk-go-v2/feature/ec2/[email protected]
main github.com/aws/aws-sdk-go-v2/internal/[email protected]
main github.com/aws/aws-sdk-go-v2/internal/endpoints/[email protected]
main github.com/aws/aws-sdk-go-v2/internal/[email protected]
main github.com/aws/aws-sdk-go-v2/service/[email protected]
main github.com/aws/aws-sdk-go-v2/service/[email protected]
main github.com/aws/aws-sdk-go-v2/service/internal/[email protected]
main github.com/aws/aws-sdk-go-v2/service/internal/[email protected]
main github.com/aws/aws-sdk-go-v2/service/internal/[email protected]
main github.com/aws/aws-sdk-go-v2/service/[email protected]
main github.com/aws/aws-sdk-go-v2/service/[email protected]
main github.com/aws/aws-sdk-go-v2/service/[email protected]
main github.com/aws/[email protected]
github.com/aws/[email protected] github.com/aws/[email protected]
github.com/aws/[email protected] github.com/jmespath/[email protected]
github.com/aws/aws-sdk-go-v2/[email protected] github.com/aws/[email protected]
github.com/aws/aws-sdk-go-v2/[email protected] github.com/aws/aws-sdk-go-v2/[email protected]
github.com/aws/aws-sdk-go-v2/[email protected] github.com/aws/aws-sdk-go-v2/feature/ec2/[email protected]
github.com/aws/aws-sdk-go-v2/[email protected] github.com/aws/aws-sdk-go-v2/internal/[email protected]
github.com/aws/aws-sdk-go-v2/[email protected] github.com/aws/aws-sdk-go-v2/service/[email protected]
github.com/aws/aws-sdk-go-v2/[email protected] github.com/aws/aws-sdk-go-v2/service/[email protected]
github.com/aws/aws-sdk-go-v2/[email protected] github.com/aws/aws-sdk-go-v2/service/[email protected]
github.com/aws/aws-sdk-go-v2/[email protected] github.com/aws/[email protected]
github.com/aws/aws-sdk-go-v2/[email protected] github.com/aws/aws-sdk-go-v2/internal/[email protected]
github.com/aws/aws-sdk-go-v2/[email protected] github.com/aws/aws-sdk-go-v2/internal/endpoints/[email protected]
github.com/aws/aws-sdk-go-v2/[email protected] github.com/aws/aws-sdk-go-v2/service/internal/[email protected]
github.com/aws/aws-sdk-go-v2/[email protected] github.com/aws/aws-sdk-go-v2/service/internal/[email protected]
github.com/aws/aws-sdk-go-v2/[email protected] github.com/aws/[email protected]
github.com/aws/aws-sdk-go-v2/[email protected] github.com/aws/aws-sdk-go-v2/feature/ec2/[email protected]
github.com/aws/aws-sdk-go-v2/[email protected] github.com/aws/aws-sdk-go-v2/service/[email protected]
github.com/aws/aws-sdk-go-v2/[email protected] github.com/aws/aws-sdk-go-v2/service/[email protected]
github.com/aws/aws-sdk-go-v2/[email protected] github.com/aws/aws-sdk-go-v2/service/[email protected]
github.com/aws/aws-sdk-go-v2/[email protected] github.com/aws/[email protected]
github.com/aws/aws-sdk-go-v2/[email protected] github.com/aws/aws-sdk-go-v2/internal/[email protected]
github.com/aws/aws-sdk-go-v2/[email protected] github.com/aws/aws-sdk-go-v2/internal/endpoints/[email protected]
github.com/aws/aws-sdk-go-v2/[email protected] github.com/aws/aws-sdk-go-v2/service/internal/[email protected]
github.com/aws/aws-sdk-go-v2/[email protected] github.com/aws/aws-sdk-go-v2/service/internal/[email protected]
github.com/aws/aws-sdk-go-v2/feature/dynamodb/[email protected] github.com/aws/[email protected]
github.com/aws/aws-sdk-go-v2/feature/dynamodb/[email protected] github.com/aws/aws-sdk-go-v2/service/[email protected]
github.com/aws/aws-sdk-go-v2/feature/dynamodb/[email protected] github.com/aws/aws-sdk-go-v2/service/[email protected]
github.com/aws/aws-sdk-go-v2/feature/dynamodb/[email protected] github.com/aws/[email protected]
github.com/aws/aws-sdk-go-v2/feature/dynamodb/[email protected] github.com/jmespath/[email protected]
github.com/aws/aws-sdk-go-v2/feature/ec2/[email protected] github.com/aws/[email protected]
github.com/aws/aws-sdk-go-v2/feature/ec2/[email protected] github.com/aws/[email protected]
github.com/aws/aws-sdk-go-v2/internal/[email protected] github.com/aws/[email protected]
github.com/aws/aws-sdk-go-v2/internal/[email protected] github.com/aws/[email protected]
github.com/aws/aws-sdk-go-v2/internal/endpoints/[email protected] github.com/aws/[email protected]
github.com/aws/aws-sdk-go-v2/internal/endpoints/[email protected] github.com/aws/[email protected]
github.com/aws/aws-sdk-go-v2/service/[email protected] github.com/aws/[email protected]
github.com/aws/aws-sdk-go-v2/service/[email protected] github.com/aws/aws-sdk-go-v2/internal/[email protected]
github.com/aws/aws-sdk-go-v2/service/[email protected] github.com/aws/aws-sdk-go-v2/internal/endpoints/[email protected]
github.com/aws/aws-sdk-go-v2/service/[email protected] github.com/aws/aws-sdk-go-v2/service/internal/[email protected]
github.com/aws/aws-sdk-go-v2/service/[email protected] github.com/aws/aws-sdk-go-v2/service/internal/[email protected]
github.com/aws/aws-sdk-go-v2/service/[email protected] github.com/aws/[email protected]
github.com/aws/aws-sdk-go-v2/service/[email protected] github.com/jmespath/[email protected]
github.com/aws/aws-sdk-go-v2/service/[email protected] github.com/aws/[email protected]
github.com/aws/aws-sdk-go-v2/service/[email protected] github.com/aws/aws-sdk-go-v2/internal/[email protected]
github.com/aws/aws-sdk-go-v2/service/[email protected] github.com/aws/aws-sdk-go-v2/internal/endpoints/[email protected]
github.com/aws/aws-sdk-go-v2/service/[email protected] github.com/aws/[email protected]
github.com/aws/aws-sdk-go-v2/service/internal/[email protected] github.com/aws/[email protected]
github.com/aws/aws-sdk-go-v2/service/internal/[email protected] github.com/aws/[email protected]
github.com/aws/aws-sdk-go-v2/service/internal/[email protected] github.com/aws/[email protected]
github.com/aws/aws-sdk-go-v2/service/internal/[email protected] github.com/aws/[email protected]
github.com/aws/aws-sdk-go-v2/service/internal/[email protected] github.com/aws/[email protected]
github.com/aws/aws-sdk-go-v2/service/[email protected] github.com/aws/[email protected]
github.com/aws/aws-sdk-go-v2/service/[email protected] github.com/aws/aws-sdk-go-v2/internal/[email protected]
github.com/aws/aws-sdk-go-v2/service/[email protected] github.com/aws/aws-sdk-go-v2/internal/endpoints/[email protected]
github.com/aws/aws-sdk-go-v2/service/[email protected] github.com/aws/[email protected]
github.com/aws/aws-sdk-go-v2/service/[email protected] github.com/aws/[email protected]
github.com/aws/aws-sdk-go-v2/service/[email protected] github.com/aws/aws-sdk-go-v2/internal/[email protected]
github.com/aws/aws-sdk-go-v2/service/[email protected] github.com/aws/aws-sdk-go-v2/internal/endpoints/[email protected]
github.com/aws/aws-sdk-go-v2/service/[email protected] github.com/aws/[email protected]
github.com/aws/aws-sdk-go-v2/service/[email protected] github.com/aws/[email protected]
github.com/aws/aws-sdk-go-v2/service/[email protected] github.com/aws/aws-sdk-go-v2/internal/[email protected]
github.com/aws/aws-sdk-go-v2/service/[email protected] github.com/aws/aws-sdk-go-v2/internal/endpoints/[email protected]
github.com/aws/aws-sdk-go-v2/service/[email protected] github.com/aws/aws-sdk-go-v2/service/internal/[email protected]
github.com/aws/aws-sdk-go-v2/service/[email protected] github.com/aws/aws-sdk-go-v2/service/internal/[email protected]
github.com/aws/aws-sdk-go-v2/service/[email protected] github.com/aws/[email protected]
src$
Compiler and Version used
$ go version go version go1.21.7 darwin/arm64
Operating System and version
macOS Sonoma 14.3.1
The text was updated successfully, but these errors were encountered: