You've already forked json-iterator
mirror of
https://github.com/json-iterator/go.git
synced 2025-06-15 22:50:24 +02:00
add document
This commit is contained in:
@ -51,6 +51,8 @@ import "github.com/json-iterator/go"
|
|||||||
jsoniter.Unmarshal(input, &data)
|
jsoniter.Unmarshal(input, &data)
|
||||||
```
|
```
|
||||||
|
|
||||||
|
[More documentation](http://jsoniter.com/migrate-from-go-std.html)
|
||||||
|
|
||||||
# How to get
|
# How to get
|
||||||
|
|
||||||
```
|
```
|
||||||
|
@ -88,3 +88,10 @@ func ExampleUnmarshalWithBestPerformance() {
|
|||||||
// Output:
|
// Output:
|
||||||
// [{Name:Platypus Order:Monotremata} {Name:Quoll Order:Dasyuromorphia}]
|
// [{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
|
||||||
|
}
|
Reference in New Issue
Block a user