proxy.golang.org : github.com/aws/aws-sdk-go/service/dynamodb/dynamodbattribute
Package dynamodbattribute provides marshaling and unmarshaling utilities to convert between Go types and dynamodb.AttributeValues. These utilities allow you to marshal slices, maps, structs, and scalar values to and from dynamodb.AttributeValue. These are useful when marshaling Go value tyes to dynamodb.AttributeValue for DynamoDB requests, or unmarshaling the dynamodb.AttributeValue back into a Go value type. To marshal a Go type to a dynamodbAttributeValue you can use the Marshal functions in the dynamodbattribute package. There are specialized versions of these functions for collections of Attributevalue, such as maps and lists. The following example uses MarshalMap to convert the Record Go type to a dynamodb.AttributeValue type and use the value to make a PutItem API request. To unmarshal a dynamodb.AttributeValue to a Go type you can use the Unmarshal functions in the dynamodbattribute package. There are specialized versions of these functions for collections of Attributevalue, such as maps and lists. The following example will unmarshal the DynamoDB's Scan API operation. The Items returned by the operation will be unmarshaled into the slice of Records Go type. The ConvertTo, ConvertToList, ConvertToMap, ConvertFrom, ConvertFromMap and ConvertFromList methods have been deprecated. The Marshal and Unmarshal functions should be used instead. The ConvertTo|From marshallers do not support BinarySet, NumberSet, nor StringSets, and will incorrectly marshal binary data fields in structs as base64 strings. The Marshal and Unmarshal functions correct this behavior, and removes the reliance on encoding.json. `json` struct tags are still supported. In addition support for a new struct tag `dynamodbav` was added. Support for the json.Marshaler and json.Unmarshaler interfaces have been removed and replaced with dynamodbattribute.Marshaler and dynamodbattribute.Unmarshaler interfaces. The Unmarshal functions are backwards compatible with data marshalled by ConvertTo*, but the reverse is not true: objects marshalled using Marshal are not necessarily usable by ConvertFrom*. This backward compatibility is intended to assist with incremental upgrading of data following a switch away from the Convert* family of functions. `time.Time` is marshaled as RFC3339 format. Deprecated: aws-sdk-go is deprecated. Use aws-sdk-go-v2. See https://aws.amazon.com/blogs/developer/announcing-end-of-support-for-aws-sdk-for-go-v1-on-july-31-2025/.
Registry
-
Source
- Documentation
- JSON
- codemeta.json
purl: pkg:golang/github.com/aws/aws-sdk-go/service/dynamodb/dynamodbattribute
Keywords:
aws
, aws-sdk
, go
License: Apache-2.0
Latest release: about 16 hours ago
Namespace: github.com/aws/aws-sdk-go/service/dynamodb
Stars: 8,705 on GitHub
Forks: 2,067 on GitHub
Total Commits: 4615
Committers: 316
Average commits per author: 14.604
Development Distribution Score (DDS): 0.753
More commit stats: commits.ecosyste.ms
See more repository details: repos.ecosyste.ms
Last synced: about 16 hours ago