1
0
mirror of https://github.com/json-iterator/go.git synced 2025-06-12 22:47:42 +02:00

use jsoniter for example

This commit is contained in:
zhaitianduo 2017-06-09 16:25:58 +08:00
parent 2608d40f2a
commit 46d443fbad

View File

@ -1,10 +1,10 @@
package jsoniter_test
import (
"encoding/json"
"fmt"
"github.com/json-iterator/go"
"os"
"encoding/json"
)
func ExampleMarshal() {
@ -37,7 +37,7 @@ func ExampleUnmarshal() {
Order string
}
var animals []Animal
err := json.Unmarshal(jsonBlob, &animals)
err := jsoniter.Unmarshal(jsonBlob, &animals)
if err != nil {
fmt.Println("error:", err)
}