chore: use internal/json (#1791)

This commit is contained in:
田欧 2019-03-05 06:46:18 +08:00 committed by GitHub
parent 805b2d4904
commit a5dda62cdc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 1 deletions

View File

@ -5,12 +5,13 @@
package binding package binding
import ( import (
"encoding/json"
"errors" "errors"
"reflect" "reflect"
"strconv" "strconv"
"strings" "strings"
"time" "time"
"github.com/gin-gonic/gin/internal/json"
) )
var errUnknownType = errors.New("Unknown type") var errUnknownType = errors.New("Unknown type")

View File

@ -11,6 +11,8 @@ import "encoding/json"
var ( var (
// Marshal is exported by gin/json package. // Marshal is exported by gin/json package.
Marshal = json.Marshal Marshal = json.Marshal
// Unmarshal is exported by gin/json package.
Unmarshal = json.Unmarshal
// MarshalIndent is exported by gin/json package. // MarshalIndent is exported by gin/json package.
MarshalIndent = json.MarshalIndent MarshalIndent = json.MarshalIndent
// NewDecoder is exported by gin/json package. // NewDecoder is exported by gin/json package.

View File

@ -12,6 +12,8 @@ var (
json = jsoniter.ConfigCompatibleWithStandardLibrary json = jsoniter.ConfigCompatibleWithStandardLibrary
// Marshal is exported by gin/json package. // Marshal is exported by gin/json package.
Marshal = json.Marshal Marshal = json.Marshal
// Unmarshal is exported by gin/json package.
Unmarshal = json.Unmarshal
// MarshalIndent is exported by gin/json package. // MarshalIndent is exported by gin/json package.
MarshalIndent = json.MarshalIndent MarshalIndent = json.MarshalIndent
// NewDecoder is exported by gin/json package. // NewDecoder is exported by gin/json package.