diff --git a/binding/form_mapping.go b/binding/form_mapping.go index 91fadcfd..87edfbb2 100644 --- a/binding/form_mapping.go +++ b/binding/form_mapping.go @@ -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") diff --git a/internal/json/json.go b/internal/json/json.go index 419d35f2..480e8bff 100644 --- a/internal/json/json.go +++ b/internal/json/json.go @@ -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. diff --git a/internal/json/jsoniter.go b/internal/json/jsoniter.go index 2021c53c..fabd7b84 100644 --- a/internal/json/jsoniter.go +++ b/internal/json/jsoniter.go @@ -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.