mirror of https://github.com/gin-gonic/gin.git
chore: use internal/json (#1791)
This commit is contained in:
parent
805b2d4904
commit
a5dda62cdc
|
@ -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")
|
||||||
|
|
|
@ -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.
|
||||||
|
|
|
@ -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.
|
||||||
|
|
Loading…
Reference in New Issue