summaryrefslogtreecommitdiff
path: root/vendor/github.com/json-iterator/go/README.md
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2019-01-11 02:25:41 -0800
committerGitHub <noreply@github.com>2019-01-11 02:25:41 -0800
commit26f2b7debde313af4a5ae39727c66a3f8fd59be4 (patch)
tree1ab2968feabc60768ac04c7f832ddfb93f97e3ad /vendor/github.com/json-iterator/go/README.md
parent36d96c19f947aeac2675afe64a3b482e54f9e4c4 (diff)
parent3966d3bf4e6be2975c330af64ce6ba86b4eeabe0 (diff)
downloadpodman-26f2b7debde313af4a5ae39727c66a3f8fd59be4.tar.gz
podman-26f2b7debde313af4a5ae39727c66a3f8fd59be4.tar.bz2
podman-26f2b7debde313af4a5ae39727c66a3f8fd59be4.zip
Merge pull request #2105 from mheon/jsoniter
Use jsoniter instead of easyjson
Diffstat (limited to 'vendor/github.com/json-iterator/go/README.md')
-rw-r--r--vendor/github.com/json-iterator/go/README.md15
1 files changed, 13 insertions, 2 deletions
diff --git a/vendor/github.com/json-iterator/go/README.md b/vendor/github.com/json-iterator/go/README.md
index 23a4b57c8..54d5afe95 100644
--- a/vendor/github.com/json-iterator/go/README.md
+++ b/vendor/github.com/json-iterator/go/README.md
@@ -8,6 +8,8 @@
A high-performance 100% compatible drop-in replacement of "encoding/json"
+You can also use thrift like JSON using [thrift-iterator](https://github.com/thrift-iterator/go)
+
```
Go开发者们请加入我们,滴滴出行平台技术部 taowen@didichuxing.com
```
@@ -29,6 +31,9 @@ Raw Result (easyjson requires static code generation)
| 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
@@ -44,7 +49,9 @@ with
```go
import "github.com/json-iterator/go"
-jsoniter.Marshal(&data)
+
+var json = jsoniter.ConfigCompatibleWithStandardLibrary
+json.Marshal(&data)
```
Replace
@@ -58,7 +65,9 @@ with
```go
import "github.com/json-iterator/go"
-jsoniter.Unmarshal(input, &data)
+
+var json = jsoniter.ConfigCompatibleWithStandardLibrary
+json.Unmarshal(input, &data)
```
[More documentation](http://jsoniter.com/migrate-from-go-std.html)
@@ -76,5 +85,7 @@ Contributors
* [thockin](https://github.com/thockin)
* [mattn](https://github.com/mattn)
* [cch123](https://github.com/cch123)
+* [Oleg Shaldybin](https://github.com/olegshaldybin)
+* [Jason Toffaletti](https://github.com/toffaletti)
Report 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)