-
Notifications
You must be signed in to change notification settings - Fork 653
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
dynamodb/attributevalue: Add AttributeValue marshaler utilities #895
Labels
feature-request
A feature should be added or improved.
Milestone
Comments
3 tasks
jasdel
added a commit
to jasdel/aws-sdk-go-v2
that referenced
this issue
Dec 9, 2020
Adds support for * Fixes aws#895 - Add support for attribute value marshaling * Fixes aws#929 - Support Number type aliases of string for support for json.Number like types. * Fixes aws#115 - Simplifies the rules of `null` vs skipped vs zero value for all types. * All nil pointers, map, slice members are serialized as NULL. * omitempty struct tag skips zero value of members with the struct tag. * Empty and Nil Sets (NS, BS, SS) are serialized to null by default unless `NullEmptySets` EncoderOptions is set to false. True by default. Nil sets are always serialized as NULL, unless the `omitempty` struct tag is used. * Adds `nullempty` and `nullemptyelem` struct tags to direct if the encoder should marshal the member as a AttributeValue NULL if the member's value is the type's zero value, (e.g. "" for string, 0 for number, nil for pointer/map/slice, false for bool)
jasdel
added a commit
to jasdel/aws-sdk-go-v2
that referenced
this issue
Dec 9, 2020
Adds support for * Fixes aws#895 - Add support for attribute value marshaling * Fixes aws#929 - Support Number type aliases of string for support for json.Number like types. * Fixes aws#115 - Simplifies the rules of `null` vs skipped vs zero value for all types. * All nil pointers, map, slice members are serialized as NULL. * omitempty struct tag skips zero value of members with the struct tag. * Empty and Nil Sets (NS, BS, SS) are serialized to null by default unless `NullEmptySets` EncoderOptions is set to false. True by default. Nil sets are always serialized as NULL, unless the `omitempty` struct tag is used. * Adds `nullempty` and `nullemptyelem` struct tags to direct if the encoder should marshal the member as a AttributeValue NULL if the member's value is the type's zero value, (e.g. "" for string, 0 for number, nil for pointer/map/slice, false for bool)
jasdel
added a commit
to jasdel/aws-sdk-go-v2
that referenced
this issue
Dec 11, 2020
Adds support for * Fixes aws#895 - Add support for attribute value marshaling * Fixes aws#929 - Support Number type aliases of string for support for json.Number like types. * Fixes aws#115 - Simplifies the rules of `null` vs skipped vs zero value for all types. * All nil pointers, map, slice members are serialized as NULL. * omitempty struct tag skips zero value of members with the struct tag. * Empty and Nil Sets (NS, BS, SS) are serialized to null by default unless `NullEmptySets` EncoderOptions is set to false. True by default. Nil sets are always serialized as NULL, unless the `omitempty` struct tag is used. * Adds `nullempty` and `nullemptyelem` struct tags to direct if the encoder should marshal the member as a AttributeValue NULL if the member's value is the type's zero value, (e.g. "" for string, 0 for number, nil for pointer/map/slice, false for bool)
jasdel
added a commit
to jasdel/aws-sdk-go-v2
that referenced
this issue
Dec 14, 2020
Adds support for * Fixes aws#895 - Add support for attribute value marshaling * Fixes aws#929 - Support Number type aliases of string for support for json.Number like types. * Fixes aws#115 - Simplifies the rules of `null` vs skipped vs zero value for all types. * All nil pointers, map, slice members are serialized as NULL. * omitempty struct tag skips zero value of members with the struct tag. * Empty and Nil Sets (NS, BS, SS) are serialized to null by default unless `NullEmptySets` EncoderOptions is set to false. True by default. Nil sets are always serialized as NULL, unless the `omitempty` struct tag is used. * Adds `nullempty` and `nullemptyelem` struct tags to direct if the encoder should marshal the member as a AttributeValue NULL if the member's value is the type's zero value, (e.g. "" for string, 0 for number, nil for pointer/map/slice, false for bool)
jasdel
added a commit
to jasdel/aws-sdk-go-v2
that referenced
this issue
Dec 15, 2020
Adds support for * Fixes aws#895 - Add support for attribute value marshaling * Fixes aws#929 - Support Number type aliases of string for support for json.Number like types. * Fixes aws#115 - Simplifies the rules of `null` vs skipped vs zero value for all types. * All nil pointers, map, slice members are serialized as NULL. * omitempty struct tag skips zero value of members with the struct tag. * Empty and Nil Sets (NS, BS, SS) are serialized to null by default unless `NullEmptySets` EncoderOptions is set to false. True by default. Nil sets are always serialized as NULL, unless the `omitempty` struct tag is used. * Adds `nullempty` and `nullemptyelem` struct tags to direct if the encoder should marshal the member as a AttributeValue NULL if the member's value is the type's zero value, (e.g. "" for string, 0 for number, nil for pointer/map/slice, false for bool)
jasdel
added a commit
that referenced
this issue
Dec 15, 2020
…948) Adds utilities for mapping Amazon DynamoDB API AttributeValue to and from Go types. * Adds conversion util for DynamoDB -> DynamoDBStreams AttributeValue. * Fixes #895 - Adds back marshaler/unmarshalers for attribute value to/from go types. * Fixes #929 - Adds generic support for `json.Number` like types that are aliases of `string`s. * Fixes #115 - Simplifies the rules of `null` vs skipped vs zero value for all types. * All nil pointers, map, slice members are serialized as NULL AttributeValue. * `omitempty` struct tag skips zero value of members with the struct tag. `omitemptyelem` skips elements of list/map that have zero value. * `nullempty` struct tag serializes zero value of members with the struct tag as NULL AttributeValue. `nullemptyelem` does same for elements of list/map that have zero value. * Empty and Nil Sets (NS, BS, SS) are serialized to null by default unless `NullEmptySets` EncoderOptions is set to false. True by default. Nil sets are always serialized as NULL, unless the`omitempty` struct tag is used. * Adds `nullempty` and `nullemptyelem` struct tags to direct if the encoder should marshal the member as a AttributeValue NULL if the member's value is the type's zero value, (e.g. "" for string, 0 for number, nil for pointer/map/slice, false for bool)
|
For future people ending up here:
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The DynamodB attribute value marshaler utilities in the v1 SDK's
/service/dynamodb/dynamoattributevalue
package were removed in the v0.25.0 update. These utilities need to be brought back, and reintroduced to the updated SDK, and refactored for the SDK's list, map, and union representations.Blocking issues
Related issues
Related Concerns
The text was updated successfully, but these errors were encountered: