summaryrefslogtreecommitdiff
path: root/vendor/github.com/json-iterator/go/README.md
diff options
context:
space:
mode:
authorMatthew Heon <matthew.heon@pm.me>2019-01-08 13:56:47 -0500
committerMatthew Heon <matthew.heon@pm.me>2019-01-10 15:48:09 -0500
commit1b761dbb02afc52f97a50af4b073a756c5cc6820 (patch)
tree2cfd5529fdffd98bbfa71b01ede72cf33bc403ce /vendor/github.com/json-iterator/go/README.md
parent07f3b147f1619b234cad0fda3d7556c1f05e7f11 (diff)
downloadpodman-1b761dbb02afc52f97a50af4b073a756c5cc6820.tar.gz
podman-1b761dbb02afc52f97a50af4b073a756c5cc6820.tar.bz2
podman-1b761dbb02afc52f97a50af4b073a756c5cc6820.zip
Update json-iterator vendor to v1.1.5
We already have it vendored for a Kube package we import, but we want a more recent version with additional bugfixes over the 1.0 release we originally had. Signed-off-by: Matthew Heon <matthew.heon@pm.me>
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)