We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 28e4bc6 commit edb0728Copy full SHA for edb0728
pkg/fftypes/jsonany_test.go
@@ -194,6 +194,18 @@ func TestUnmarshalHugeNumber(t *testing.T) {
194
assert.Equal(t, json.Number("123456789123456789123456789"), myObj.Key1)
195
}
196
197
+func TestUnmarshalHugeNumberError(t *testing.T) {
198
+
199
+ var h *JSONAny
200
+ var myObj struct {
201
+ Key1 interface{} `json:"key1"`
202
+ }
203
204
+ h = JSONAnyPtr(`{"key1":1234567891invalidchars234569}`)
205
+ err := h.Unmarshal(context.Background(), &myObj)
206
+ assert.Error(t, err)
207
+}
208
209
func TestNilHash(t *testing.T) {
210
assert.Nil(t, (*JSONAny)(nil).Hash())
211
0 commit comments