GitPedia

Go

A high-performance 100% compatible drop-in replacement of "encoding/json"

From json-iterator·Updated June 15, 2026·View on GitHub·
·Archived

A high-performance 100% compatible drop-in replacement of "encoding/json" The project is written primarily in Go, distributed under the MIT License license, first published in 2016. It has gained significant community traction with 13,890 stars and 1,056 forks on GitHub. Key topics include: deserialization, go, golang, json, json-parser.

Latest release: v1.1.12fix go 1.18 compatibility
September 11, 2021View Changelog →

Sourcegraph
GoDoc
Build Status
codecov
rcard
License
Gitter chat

A high-performance 100% compatible drop-in replacement of "encoding/json"

Benchmark

benchmark

Source code: https://github.com/json-iterator/go-benchmark/blob/master/src/github.com/json-iterator/go-benchmark/benchmark_medium_payload_test.go

Raw Result (easyjson requires static code generation)

ns/opallocation bytesallocation times
std decode35510 ns/op1960 B/op99 allocs/op
easyjson decode8499 ns/op160 B/op4 allocs/op
jsoniter decode5623 ns/op160 B/op3 allocs/op
std encode2213 ns/op712 B/op5 allocs/op
easyjson encode883 ns/op576 B/op3 allocs/op
jsoniter encode837 ns/op384 B/op4 allocs/op

Always benchmark with your own workload.
The result depends heavily on the data input.

Usage

100% compatibility with standard lib

Replace

go
import "encoding/json" json.Marshal(&data)

with

go
import jsoniter "github.com/json-iterator/go" var json = jsoniter.ConfigCompatibleWithStandardLibrary json.Marshal(&data)

Replace

go
import "encoding/json" json.Unmarshal(input, &data)

with

go
import jsoniter "github.com/json-iterator/go" var json = jsoniter.ConfigCompatibleWithStandardLibrary json.Unmarshal(input, &data)

More documentation

How to get

go get github.com/json-iterator/go

Contribution Welcomed !

Contributors

Report issue or pull request, or email taowen@gmail.com, or Gitter chat

Contributors

Showing top 12 contributors by commit count.

View all contributors on GitHub →

This article is auto-generated from json-iterator/go via the GitHub API.Last fetched: 6/16/2026