1
0
mirror of https://github.com/json-iterator/go.git synced 2025-06-15 22:50:24 +02:00

make ReadObject return safe string

This commit is contained in:
Tao Wen
2017-01-20 12:40:52 +08:00
parent a73e48e8bf
commit d14b025931
3 changed files with 33 additions and 23 deletions

View File

@ -82,7 +82,7 @@ func Test_write_object(t *testing.T) {
stream.WriteObjectEnd()
stream.Flush()
should.Nil(stream.Error)
should.Equal("{\n hello:1,\n world:2\n}", buf.String())
should.Equal("{\n \"hello\":1,\n \"world\":2\n}", buf.String())
}
type TestObj struct {