Open dysuby opened 2 years ago
go version: 1.15.9 jsoniter version: v1.1.12 go test:
func TestJSON(t *testing.T) { j := "{\"0123\": 1}" data := map[int64]int64{} err := json.Unmarshal([]byte(j), &data) if err != nil { t.Errorf("std lib error: %v", err) } else { t.Logf("std lib success: %v", data) } err = jsoniter.ConfigCompatibleWithStandardLibrary.UnmarshalFromString(j, &data) if err != nil { t.Errorf("jsoniter lib error: %v", err) } }
output:
std lib success: map[123:1] jsoniter lib error: ReadMapCB: expect ", but found 1, error found in #4 byte of ...|{"0123": 1}|..., bigger context ...|{"0123": 1}|...
go version: 1.15.9 jsoniter version: v1.1.12 go test:
output: