GitHub 火线榜

GitHub 火线榜 · 仓库档案

json-iterator/go

A high-performance 100% compatible drop-in replacement of "encoding/json" (简介来自仓库自身文档。)

数据截至 10月27日json-iterator

最好成绩

#312

总榜 · Go 语言

1.4万

累计 Star

1053

Fork 总数

0

近 30 天在榜天数

项目状态许可证: MIT最近 push: 5月27日Open Issues(含 PR): 272

自 2026-10-25 起采集;未知 = 尚未采集到

把上榜徽章放进你的 README · json-iterator/go[![把上榜徽章放进你的 README](https://git.vaiox.xyz/api/badge/json-iterator/go.svg)](https://git.vaiox.xyz/zh/repo/json-iterator/go)
<a href="https://git.vaiox.xyz/zh/repo/json-iterator/go"><img src="https://git.vaiox.xyz/api/badge/json-iterator/go.svg" alt="把上榜徽章放进你的 README" height="20"></a>

项目文档

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/op allocation bytes allocation times
std decode 35510 ns/op 1960 B/op 99 allocs/op
easyjson decode 8499 ns/op 160 B/op 4 allocs/op
jsoniter decode 5623 ns/op 160 B/op 3 allocs/op
std encode 2213 ns/op 712 B/op 5 allocs/op
easyjson encode 883 ns/op 576 B/op 3 allocs/op
jsoniter encode 837 ns/op 384 B/op 4 allocs/op

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

Usage

100% compatibility with standard lib

Replace

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

with

import jsoniter "github.com/json-iterator/go"

var json = jsoniter.ConfigCompatibleWithStandardLibrary
json.Marshal(&data)

Replace

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

with

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

当前上榜

  • 312

    总榜 · 史上最强 · Go

    1.4万 星 · 1053 fork · 累计 Star

    总榜 · Go →

近 30 天势头

近 30 天没有上榜记录。

同类项目 · 共享主题

← 回到榜单