Skip to content

Commit

Permalink
chore: use internal/json (#1791)
Browse files Browse the repository at this point in the history
  • Loading branch information
thinkerou committed Mar 4, 2019
1 parent 805b2d4 commit a5dda62
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
3 changes: 2 additions & 1 deletion binding/form_mapping.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,13 @@
package binding

import (
"encoding/json"
"errors"
"reflect"
"strconv"
"strings"
"time"

"github.com/gin-gonic/gin/internal/json"
)

var errUnknownType = errors.New("Unknown type")
Expand Down
2 changes: 2 additions & 0 deletions internal/json/json.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ import "encoding/json"
var (
// Marshal is exported by gin/json package.
Marshal = json.Marshal
// Unmarshal is exported by gin/json package.
Unmarshal = json.Unmarshal
// MarshalIndent is exported by gin/json package.
MarshalIndent = json.MarshalIndent
// NewDecoder is exported by gin/json package.
Expand Down
2 changes: 2 additions & 0 deletions internal/json/jsoniter.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ var (
json = jsoniter.ConfigCompatibleWithStandardLibrary
// Marshal is exported by gin/json package.
Marshal = json.Marshal
// Unmarshal is exported by gin/json package.
Unmarshal = json.Unmarshal
// MarshalIndent is exported by gin/json package.
MarshalIndent = json.MarshalIndent
// NewDecoder is exported by gin/json package.
Expand Down

0 comments on commit a5dda62

Please sign in to comment.