1
0
mirror of https://github.com/json-iterator/go.git synced 2025-06-24 23:16:47 +02:00

#56 nil map or array should be null not [] or {}

This commit is contained in:
Tao Wen
2017-06-13 09:14:19 +08:00
parent 6e5817b773
commit 788918b85d
6 changed files with 64 additions and 6 deletions

View File

@ -112,6 +112,16 @@ func Test_decode_slash(t *testing.T) {
should.NotNil(UnmarshalFromString("\\", &obj))
}
//func Test_html_escape(t *testing.T) {
// should := require.New(t)
// output, err := json.Marshal(`>`)
// should.Nil(err)
// should.Equal(`"\u003e"`, string(output))
// output, err = Marshal(`>`)
// should.Nil(err)
// should.Equal(`"\u003e"`, string(output))
//}
func Benchmark_jsoniter_unicode(b *testing.B) {
for n := 0; n < b.N; n++ {
iter := ParseString(`"\ud83d\udc4a"`)