go
go copied to clipboard
A high-performance 100% compatible drop-in replacement of "encoding/json"
go version: 1.15.9 jsoniter version: v1.1.12 go test: ```go func TestJSON(t *testing.T) { j := "{\"0123\": 1}" data := map[int64]int64{} err := json.Unmarshal([]byte(j), &data) if err != nil { t.Errorf("std...
panic
unexpected fault address 0x186a0 fatal error: fault [signal SIGSEGV: segmentation violation code=0x1 addr=0x186a0 pc=0x81497b] goroutine 2640123 [running]: runtime.throw(0x17cb2c8, 0x5) /usr/local/go/src/runtime/panic.go:1117 +0x72 fp=0xc0068e8148 sp=0xc0068e8118 pc=0x438432 runtime.sigpanic() /usr/local/go/src/runtime/signal_unix.go:741 +0x268 fp=0xc0068e8180 sp=0xc0068e8148 pc=0x44fb88...
Noticed from Orijtech's continuous benchmarking product "Bencher" per https://dashboard.github.orijtech.com/benchmark/3245b8e4bbbd44a597480319aaa4b9fe that there is a bunch of code in the wild that invokes: fmt.Sprintf("%s", string([]byte(...))) yet the "%s" format specifier in fmt...
Hi all, I wanna know when will the funtion Marshal return an error in library json-iterator? Is it the same as library json? Library json shows the following scenes: (1)...
I've tried to use `json-iterator/go` instead of `encoding/json` and found the following incompatibility. When a custom `UnmarshalJSON` returns an error the error is propagated 1:1 to the caller of `encoding/json.Unmarshal`...
I've tried to use `json-iterator/go` instead of `encoding/json` and found the following incompatibility. When using a custom `MarshalJSON` func which returns non-compacted JSON `encoding/json` compacts the output and `json-iterator/go` does...
Similar to #583 , this reduces the effective surface of this library, reducing the risks of introducing incompatibilities.
Instead of introducing a custom `RawMessage` type that simply wraps a `[]byte` and has no methods, make `jsoniter.RawMessage` an alias of `json.RawMessage`, thereby increasing compatibility when replacing `encoding/json`.
I have a vulnerability issue in my code caused by the lib json-iterator `All versions of package com.jsoniter:jsoniter are vulnerable to Deserialization of Untrusted Data via malicious JSON strings. This...
hi, sorry for not pull requesting this but here goes ```bash #!/bin/bash set -e -o pipefail set -x export GOPATH="${GOBUILD:-/tmp/build-golang}" SELF=$(readlink -f "${BASH_SOURCE[0]}" 2>/dev/null || stat -f "${BASH_SOURCE[0]}") cd "$(dirname...