Skip to content

Commit

Permalink
accept by value too
Browse files Browse the repository at this point in the history
  • Loading branch information
fabiokung committed Aug 31, 2012
1 parent 1224bac commit 4a1ab5a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions dynamodb.go
Original file line number Diff line number Diff line change
Expand Up @@ -104,11 +104,11 @@ func fieldToDynamoString(v reflect.Value) (typeId string, value string, err erro
return "", "", &json.MarshalerError{Type: v.Type()}
}

func (i *PutRequestItem) MarshalJSON() ([]byte, error) {
func (i PutRequestItem) MarshalJSON() ([]byte, error) {
var out bytes.Buffer

v := reflect.ValueOf(i.Value)
if v.Kind() == reflect.Interface || v.Kind() == reflect.Ptr {
for v.Kind() == reflect.Interface || v.Kind() == reflect.Ptr {
v = v.Elem()
}

Expand Down

0 comments on commit 4a1ab5a

Please sign in to comment.