add internal package which includes json package (#1504)

This commit is contained in:
田欧
2018-08-30 19:04:03 +08:00
committed by GitHub
parent 708b76adf0
commit 72db8acd99
7 changed files with 5 additions and 5 deletions

16
internal/json/json.go Normal file
View File

@ -0,0 +1,16 @@
// Copyright 2017 Bo-Yi Wu. All rights reserved.
// Use of this source code is governed by a MIT style
// license that can be found in the LICENSE file.
// +build !jsoniter
package json
import "encoding/json"
var (
Marshal = json.Marshal
MarshalIndent = json.MarshalIndent
NewDecoder = json.NewDecoder
NewEncoder = json.NewEncoder
)

17
internal/json/jsoniter.go Normal file
View File

@ -0,0 +1,17 @@
// Copyright 2017 Bo-Yi Wu. All rights reserved.
// Use of this source code is governed by a MIT style
// license that can be found in the LICENSE file.
// +build jsoniter
package json
import "github.com/json-iterator/go"
var (
json = jsoniter.ConfigCompatibleWithStandardLibrary
Marshal = json.Marshal
MarshalIndent = json.MarshalIndent
NewDecoder = json.NewDecoder
NewEncoder = json.NewEncoder
)