From 719291149b60d310886326f62be0f4b3461c3f59 Mon Sep 17 00:00:00 2001 From: Jon Williams Date: Tue, 7 Jan 2020 16:33:26 -0500 Subject: [PATCH] Support encoding.TextUnmarshaller for numeric types --- decode.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/decode.go b/decode.go index 7f58da8..18e216d 100644 --- a/decode.go +++ b/decode.go @@ -69,6 +69,9 @@ func unmarshalReflect(av *dynamodb.AttributeValue, rv reflect.Value) error { if av.S != nil { return x.UnmarshalText([]byte(*av.S)) } + if av.N != nil { + return x.UnmarshalText([]byte(*av.N)) + } } }