Skip to content
Myr

add internal package which includes json package (#1504)

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by 田欧 · committed by GitHub · parent 708b76a · Browse files · 9 files+38 added−38 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

9 files+38 added−38 removed

  • other:+38 added−38 removed

9 files+38 added−38 removed

modified:binding/json.go+1 added-1 removed
7 unmodified lines
8 "bytes"9 "io"10 "net/http"1112 "github.com/gin-gonic/gin/json"12 "github.com/gin-gonic/gin/internal/json"13)1415// EnableDecoderUseNumber is used to call the UseNumber method on the JSON16// Decoder instance. UseNumber causes the Decoder to unmarshal a number into an
27 unmodified lines
added:internal/json/json.go+16 added
1// Copyright 2017 Bo-Yi Wu. All rights reserved.2// Use of this source code is governed by a MIT style3// license that can be found in the LICENSE file.45// +build !jsoniter67package json89import "encoding/json"1011var (12 Marshal = json.Marshal13 MarshalIndent = json.MarshalIndent14 NewDecoder = json.NewDecoder15 NewEncoder = json.NewEncoder16)
added:internal/json/jsoniter.go+17 added
1// Copyright 2017 Bo-Yi Wu. All rights reserved.2// Use of this source code is governed by a MIT style3// license that can be found in the LICENSE file.45// +build jsoniter67package json89import "github.com/json-iterator/go"1011var (12 json = jsoniter.ConfigCompatibleWithStandardLibrary13 Marshal = json.Marshal14 MarshalIndent = json.MarshalIndent15 NewDecoder = json.NewDecoder16 NewEncoder = json.NewEncoder17)
deleted:json/json.go-16 removed
1// Copyright 2017 Bo-Yi Wu. All rights reserved.2// Use of this source code is governed by a MIT style3// license that can be found in the LICENSE file.45// +build !jsoniter67package json89import "encoding/json"1011var (12 Marshal = json.Marshal13 MarshalIndent = json.MarshalIndent14 NewDecoder = json.NewDecoder15 NewEncoder = json.NewEncoder16)
deleted:json/jsoniter.go-17 removed
1// Copyright 2017 Bo-Yi Wu. All rights reserved.2// Use of this source code is governed by a MIT style3// license that can be found in the LICENSE file.45// +build jsoniter67package json89import "github.com/json-iterator/go"1011var (12 json = jsoniter.ConfigCompatibleWithStandardLibrary13 Marshal = json.Marshal14 MarshalIndent = json.MarshalIndent15 NewDecoder = json.NewDecoder16 NewEncoder = json.NewEncoder17)
modified:render/json_17.go+1 added-1 removed
7 unmodified lines
89import (10 "net/http"1112 "github.com/gin-gonic/gin/json"12 "github.com/gin-gonic/gin/internal/json"13)1415type PureJSON struct {16 Data interface{}
12 unmodified lines
modified:render/json.go+1 added-1 removed
8 unmodified lines
9 "fmt"10 "html/template"11 "net/http"1213 "github.com/gin-gonic/gin/json"13 "github.com/gin-gonic/gin/internal/json"14)1516type JSON struct {17 Data interface{}
127 unmodified lines
modified:errors_test.go+1 added-1 removed
6 unmodified lines
7import (8 "errors"9 "testing"1011 "github.com/gin-gonic/gin/json"11 "github.com/gin-gonic/gin/internal/json"12 "github.com/stretchr/testify/assert"13)1415func TestError(t *testing.T) {
91 unmodified lines
modified:errors.go+1 added-1 removed
7 unmodified lines
8 "bytes"9 "fmt"10 "reflect"1112 "github.com/gin-gonic/gin/json"12 "github.com/gin-gonic/gin/internal/json"13)1415type ErrorType uint6416
141 unmodified lines