1
0
mirror of https://github.com/json-iterator/go.git synced 2024-11-24 08:22:14 +02:00

add document

This commit is contained in:
Tao Wen 2017-06-18 23:42:23 +08:00
parent 3ffa5af7ec
commit b6dfbbd6bc
2 changed files with 9 additions and 0 deletions

View File

@ -51,6 +51,8 @@ import "github.com/json-iterator/go"
jsoniter.Unmarshal(input, &data)
```
[More documentation](http://jsoniter.com/migrate-from-go-std.html)
# How to get
```

View File

@ -88,3 +88,10 @@ func ExampleUnmarshalWithBestPerformance() {
// Output:
// [{Name:Platypus Order:Monotremata} {Name:Quoll Order:Dasyuromorphia}]
}
func ExampleOneLine() {
val := []byte(`{"ID":1,"Name":"Reds","Colors":["Crimson","Red","Ruby","Maroon"]}`)
fmt.Printf(jsoniter.Get(val, "Colors", 0).ToString())
// Output:
// Crimson
}