json-iterator/go
Fork: 1027 Star: 13449 (更新于 2024-11-21 13:44:36)
license: MIT
Language: Go .
A high-performance 100% compatible drop-in replacement of "encoding/json"
最后发布版本: v1.1.12 ( 2021-09-11 10:19:57)
A high-performance 100% compatible drop-in replacement of "encoding/json"
Benchmark
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)
How to get
go get github.com/json-iterator/go
Contribution Welcomed !
Contributors
Report issue or pull request, or email taowen@gmail.com, or
最近版本更新:(数据更新于 2024-10-24 23:47:05)
2021-09-11 10:19:57 v1.1.12
2021-04-28 10:30:11 v1.1.11
2020-06-09 15:44:37 v1.1.10
2019-12-21 11:12:22 v1.1.9
2019-10-30 08:37:01 v1.1.8
2019-10-17 08:09:06 1.1.8
2019-07-24 18:41:34 v1.1.7
2019-03-12 22:38:52 v1.1.6
2018-08-25 22:08:27 v1.1.5
2018-08-06 14:26:42 1.1.5
主题(topics):
deserialization, go, golang, json, json-parser, parser, serialization, serializer
json-iterator/go同语言 Go最近更新仓库
2024-11-22 20:14:47 daytonaio/daytona
2024-11-21 22:49:20 containerd/containerd
2024-11-21 13:50:50 XTLS/Xray-core
2024-11-21 07:36:18 kubernetes/kubernetes
2024-11-21 06:27:30 ollama/ollama
2024-11-21 05:17:55 Melkeydev/go-blueprint