forked from mirror/go-json
2.2 KiB
2.2 KiB
go-json
Fast JSON encoder/decoder compatible with encoding/json for Go
Installation
go get github.com/goccy/go-json
How to use
Replace import statement from encoding/json
to github.com/goccy/go-json
-import "encoding/json"
+import "github.com/goccy/go-json"
JSON library comparison
name | encoder | decoder | compatible with encoding/json |
---|---|---|---|
encoding/json | ○ | ○ | N/A |
json-iterator/go | ○ | ○ | △ |
easyjson | ○ | ○ | ✗ |
gojay | ○ | ○ | ✗ |
segmentio/encoding/json | ○ | ○ | ○ |
jettison | ○ | ✗ | ✗ |
simdjson-go | ✗ | ○ | ✗ |
go-json | ○ | ○ | ○ |
json-iterator/go
isn't compatible withencoding/json
in many ways, but it hasn't been supported for a long time.
Benchmarks
$ cd benchmarks
$ go test -bench .
Encode
Decode
License
MIT