diff options
author | Luke Shumaker <lukeshu@lukeshu.com> | 2023-02-24 20:51:58 -0700 |
---|---|---|
committer | Luke Shumaker <lukeshu@lukeshu.com> | 2023-02-25 21:41:57 -0700 |
commit | 237e6ed6c125658be232c259b8b7689c5b7ef966 (patch) | |
tree | c25476239dd2ebc3c3f95e6b78398b480fa29c4b /compat/json/compat_test.go | |
parent | 8a0ea88b8600c0bd13095fdc29740aa4c452f65d (diff) |
encode: Sort maps by the pre-string-encoded key
Diffstat (limited to 'compat/json/compat_test.go')
-rw-r--r-- | compat/json/compat_test.go | 1 |
1 files changed, 1 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 |