11[ ![ Sourcegraph] ( https://sourcegraph.com/github.com/json-iterator/go/-/badge.svg )] ( https://sourcegraph.com/github.com/json-iterator/go?badge )
2- [ ![ GoDoc] ( http://img.shields.io/badge/go-documentation-blue.svg?style=flat-square )] ( http ://godoc.org /github.com/json-iterator/go)
2+ [ ![ GoDoc] ( http://img.shields.io/badge/go-documentation-blue.svg?style=flat-square )] ( https ://pkg.go.dev /github.com/json-iterator/go)
33[ ![ Build Status] ( https://travis-ci.org/json-iterator/go.svg?branch=master )] ( https://travis-ci.org/json-iterator/go )
44[ ![ codecov] ( https://codecov.io/gh/json-iterator/go/branch/master/graph/badge.svg )] ( https://codecov.io/gh/json-iterator/go )
55[ ![ rcard] ( https://goreportcard.com/badge/github.com/json-iterator/go )] ( https://goreportcard.com/report/github.com/json-iterator/go )
@@ -18,16 +18,16 @@ Source code: https://github.com/json-iterator/go-benchmark/blob/master/src/githu
1818
1919Raw Result (easyjson requires static code generation)
2020
21- | | ns/op | allocation bytes | allocation times |
22- | --- | --- | --- | --- |
23- | std decode | 35510 ns/op | 1960 B/op | 99 allocs/op |
24- | easyjson decode | 8499 ns/op | 160 B/op | 4 allocs/op |
25- | jsoniter decode | 5623 ns/op | 160 B/op | 3 allocs/op |
26- | std encode | 2213 ns/op | 712 B/op | 5 allocs/op |
27- | easyjson encode | 883 ns/op | 576 B/op | 3 allocs/op |
28- | jsoniter encode | 837 ns/op | 384 B/op | 4 allocs/op |
21+ | | ns/op | allocation bytes | allocation times |
22+ | --------------- | ----------- | ---------------- | ------------- --- |
23+ | std decode | 35510 ns/op | 1960 B/op | 99 allocs/op |
24+ | easyjson decode | 8499 ns/op | 160 B/op | 4 allocs/op |
25+ | jsoniter decode | 5623 ns/op | 160 B/op | 3 allocs/op |
26+ | std encode | 2213 ns/op | 712 B/op | 5 allocs/op |
27+ | easyjson encode | 883 ns/op | 576 B/op | 3 allocs/op |
28+ | jsoniter encode | 837 ns/op | 384 B/op | 4 allocs/op |
2929
30- Always benchmark with your own workload.
30+ Always benchmark with your own workload.
3131The result depends heavily on the data input.
3232
3333# Usage
@@ -41,10 +41,10 @@ import "encoding/json"
4141json.Marshal (&data)
4242```
4343
44- with
44+ with
4545
4646``` go
47- import " github.com/json-iterator/go"
47+ import jsoniter " github.com/json-iterator/go"
4848
4949var json = jsoniter.ConfigCompatibleWithStandardLibrary
5050json.Marshal (&data)
@@ -60,7 +60,7 @@ json.Unmarshal(input, &data)
6060with
6161
6262``` go
63- import " github.com/json-iterator/go"
63+ import jsoniter " github.com/json-iterator/go"
6464
6565var json = jsoniter.ConfigCompatibleWithStandardLibrary
6666json.Unmarshal (input, &data)
@@ -78,10 +78,10 @@ go get github.com/json-iterator/go
7878
7979Contributors
8080
81- * [ thockin] ( https://github.com/thockin )
82- * [ mattn] ( https://github.com/mattn )
83- * [ cch123] ( https://github.com/cch123 )
84- * [ Oleg Shaldybin] ( https://github.com/olegshaldybin )
85- * [ Jason Toffaletti] ( https://github.com/toffaletti )
81+ - [ thockin] ( https://github.com/thockin )
82+ - [ mattn] ( https://github.com/mattn )
83+ - [ cch123] ( https://github.com/cch123 )
84+ - [ Oleg Shaldybin] ( https://github.com/olegshaldybin )
85+ - [ Jason Toffaletti] ( https://github.com/toffaletti )
8686
8787Report issue or pull request, or email taowen@gmail.com , or [ ![ Gitter chat] ( https://badges.gitter.im/gitterHQ/gitter.png )] ( https://gitter.im/json-iterator/Lobby )
0 commit comments