gojay

high performance JSON encoder/decoder with stream API for Golang
git clone git://git.lair.cx/gojay
Log | Files | Refs | README | LICENSE

commit f9f08ebcd7cc5619b7fe6bc00014f1ac37603241
parent 8354e5bc6417f4cab09b599c39331c2e389a95e1
Author: francoispqt <francois@parquet.ninja>
Date:   Sun, 20 May 2018 00:10:59 +0800

add test for unicode decoding

Diffstat:
Mdecode_string_test.go | 6++++++
1 file changed, 6 insertions(+), 0 deletions(-)

diff --git a/decode_string_test.go b/decode_string_test.go @@ -139,6 +139,12 @@ func TestDecoderString(t *testing.T) { }, { name: "utf16-surrogate", + json: `"\uD834\uD834"`, + expectedResult: "�\x00\x00\x00", + err: false, + }, + { + name: "utf16-surrogate", json: `"\uD834"`, expectedResult: `�`, err: false,