Please fill out the sections below to help us address your issue.
v1.21.5
go version)?go version go1.11.5 linux/amd64
dynamodbattribute.Marshal incorrectly marshals an empty list to {NULL: true}
func Test_marshalIssue(t *testing.T) {
type customStruct struct {
key string
val string
}
d, _ := dynamodbattribute.Marshal([]*customStruct{})
t.Error(d)
/*prints
{
NULL: true
}
*/
}
Expected:
Empty list should be marshaled to
&dynamodb.AttributeValue{
L: []*dynamodb.AttributeValue{},
}
Hi @vipingoel, thanks for reaching out to us about this and I do apologize for the long delay in response from our end. Fixing this behavior is something we've had in our backlog for some time, I've brought this up with the rest of the team this week and we've agreed to prioritize the implementation of this change in a non-breaking manner. You can track progress on this in PR #2419.
Most helpful comment
Hi @vipingoel, thanks for reaching out to us about this and I do apologize for the long delay in response from our end. Fixing this behavior is something we've had in our backlog for some time, I've brought this up with the rest of the team this week and we've agreed to prioritize the implementation of this change in a non-breaking manner. You can track progress on this in PR #2419.