summaryrefslogtreecommitdiff
path: root/vendor/github.com/gin-gonic/gin/internal
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/github.com/gin-gonic/gin/internal')
-rw-r--r--vendor/github.com/gin-gonic/gin/internal/json/go_json.go23
-rw-r--r--vendor/github.com/gin-gonic/gin/internal/json/json.go6
-rw-r--r--vendor/github.com/gin-gonic/gin/internal/json/jsoniter.go2
3 files changed, 27 insertions, 4 deletions
diff --git a/vendor/github.com/gin-gonic/gin/internal/json/go_json.go b/vendor/github.com/gin-gonic/gin/internal/json/go_json.go
new file mode 100644
index 000000000..23f717265
--- /dev/null
+++ b/vendor/github.com/gin-gonic/gin/internal/json/go_json.go
@@ -0,0 +1,23 @@
+// Copyright 2017 Bo-Yi Wu. All rights reserved.
+// Use of this source code is governed by a MIT style
+// license that can be found in the LICENSE file.
+
+//go:build go_json
+// +build go_json
+
+package json
+
+import json "github.com/goccy/go-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.
+ NewDecoder = json.NewDecoder
+ // NewEncoder is exported by gin/json package.
+ NewEncoder = json.NewEncoder
+)
diff --git a/vendor/github.com/gin-gonic/gin/internal/json/json.go b/vendor/github.com/gin-gonic/gin/internal/json/json.go
index 172aeb241..a26d7db2e 100644
--- a/vendor/github.com/gin-gonic/gin/internal/json/json.go
+++ b/vendor/github.com/gin-gonic/gin/internal/json/json.go
@@ -1,9 +1,9 @@
-// Copyright 2017 Bo-Yi Wu. All rights reserved.
+// Copyright 2017 Bo-Yi Wu. All rights reserved.
// Use of this source code is governed by a MIT style
// license that can be found in the LICENSE file.
-//go:build !jsoniter
-// +build !jsoniter
+//go:build !jsoniter && !go_json
+// +build !jsoniter,!go_json
package json
diff --git a/vendor/github.com/gin-gonic/gin/internal/json/jsoniter.go b/vendor/github.com/gin-gonic/gin/internal/json/jsoniter.go
index 232f8dcad..853b1a901 100644
--- a/vendor/github.com/gin-gonic/gin/internal/json/jsoniter.go
+++ b/vendor/github.com/gin-gonic/gin/internal/json/jsoniter.go
@@ -1,4 +1,4 @@
-// Copyright 2017 Bo-Yi Wu. All rights reserved.
+// Copyright 2017 Bo-Yi Wu. All rights reserved.
// Use of this source code is governed by a MIT style
// license that can be found in the LICENSE file.