summaryrefslogtreecommitdiff
path: root/compat/json
diff options
context:
space:
mode:
Diffstat (limited to 'compat/json')
-rw-r--r--compat/json/compat_test.go1
-rw-r--r--compat/json/testdata/fuzz/FuzzEquiv/8a7cd8b26dc500eb2
2 files changed, 3 insertions, 0 deletions
diff --git a/compat/json/compat_test.go b/compat/json/compat_test.go
index af92093..52ed60e 100644
--- a/compat/json/compat_test.go
+++ b/compat/json/compat_test.go
@@ -154,6 +154,7 @@ func TestCompatMarshal(t *testing.T) {
"non-utf8": {In: "\x85\xcd", Out: "\"\\ufffd\\ufffd\""},
"urc": {In: "\ufffd", Out: "\"\ufffd\""},
"float": {In: 1.2e3, Out: `1200`},
+ "obj": {In: map[string]any{"": 1, " ": 2}, Out: `{"":1," ":2}`},
}
for tcName, tc := range testcases {
tc := tc
diff --git a/compat/json/testdata/fuzz/FuzzEquiv/8a7cd8b26dc500eb b/compat/json/testdata/fuzz/FuzzEquiv/8a7cd8b26dc500eb
new file mode 100644
index 0000000..bb896c9
--- /dev/null
+++ b/compat/json/testdata/fuzz/FuzzEquiv/8a7cd8b26dc500eb
@@ -0,0 +1,2 @@
+go test fuzz v1
+[]byte("{\" \":{},\"\":0}")