From 9f31f3aa8ac4f6bfc8390c9ae63b2a387b414c88 Mon Sep 17 00:00:00 2001 From: Lunny Xiao Date: Sun, 25 Jul 2021 00:03:58 +0800 Subject: Add an abstract json layout to make it's easier to change json library (#16528) * Add an abstract json layout to make it's easier to change json library * Fix import * Fix import sequence * Fix blank lines * Fix blank lines --- modules/httplib/httplib.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'modules/httplib') diff --git a/modules/httplib/httplib.go b/modules/httplib/httplib.go index 5c8eac8b42..aecdd4346c 100644 --- a/modules/httplib/httplib.go +++ b/modules/httplib/httplib.go @@ -24,7 +24,7 @@ import ( "sync" "time" - jsoniter "github.com/json-iterator/go" + "code.gitea.io/gitea/modules/json" ) var defaultSetting = Settings{false, "GiteaServer", 60 * time.Second, 60 * time.Second, nil, nil, nil, false} @@ -443,7 +443,6 @@ func (r *Request) ToJSON(v interface{}) error { if err != nil { return err } - json := jsoniter.ConfigCompatibleWithStandardLibrary err = json.Unmarshal(data, v) return err } -- cgit v1.2.3