# go-json ![Go](https://github.com/goccy/go-json/workflows/Go/badge.svg) [![GoDoc](https://godoc.org/github.com/goccy/go-json?status.svg)](https://pkg.go.dev/github.com/goccy/go-json?tab=doc) [![codecov](https://codecov.io/gh/goccy/go-json/branch/master/graph/badge.svg)](https://codecov.io/gh/goccy/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](https://github.com/json-iterator/go) | ○ | ○ | △ | | [easyjson](https://github.com/mailru/easyjson) | ○ | ○ | ✗ | | [gojay](https://github.com/francoispqt/gojay) | ○ | ○ | ✗ | | [segmentio/encoding/json](github.com/segmentio/encoding/json) | ○ | ○ | ○ | | [jettison](github.com/wI2L/jettison) | ○ | ✗ | ✗ | | [simdjson-go](https://github.com/minio/simdjson-go) | ✗ | ○ | ✗ | | go-json | ○ | ○ | ○ | - `json-iterator/go` isn't compatible with `encoding/json` in many ways, but it hasn't been supported for a long time. # Benchmarks ``` $ cd benchmarks $ go test -bench . ``` ## Encode ## Decode # License MIT