summaryrefslogtreecommitdiffstats
path: root/services/lfs/server.go
diff options
context:
space:
mode:
Diffstat (limited to 'services/lfs/server.go')
-rw-r--r--services/lfs/server.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/services/lfs/server.go b/services/lfs/server.go
index 6b79a3a364..0d357939d5 100644
--- a/services/lfs/server.go
+++ b/services/lfs/server.go
@@ -17,12 +17,12 @@ import (
"code.gitea.io/gitea/models"
"code.gitea.io/gitea/modules/context"
+ "code.gitea.io/gitea/modules/json"
lfs_module "code.gitea.io/gitea/modules/lfs"
"code.gitea.io/gitea/modules/log"
"code.gitea.io/gitea/modules/setting"
"github.com/golang-jwt/jwt"
- jsoniter "github.com/json-iterator/go"
)
// requestContext contain variables from the HTTP request.
@@ -243,7 +243,7 @@ func BatchHandler(ctx *context.Context) {
ctx.Resp.Header().Set("Content-Type", lfs_module.MediaType)
- enc := jsoniter.NewEncoder(ctx.Resp)
+ enc := json.NewEncoder(ctx.Resp)
if err := enc.Encode(respobj); err != nil {
log.Error("Failed to encode representation as json. Error: %v", err)
}
@@ -336,7 +336,7 @@ func VerifyHandler(ctx *context.Context) {
func decodeJSON(req *http.Request, v interface{}) error {
defer req.Body.Close()
- dec := jsoniter.NewDecoder(req.Body)
+ dec := json.NewDecoder(req.Body)
return dec.Decode(v)
}
@@ -429,7 +429,7 @@ func writeStatusMessage(ctx *context.Context, status int, message string) {
er := lfs_module.ErrorResponse{Message: message}
- enc := jsoniter.NewEncoder(ctx.Resp)
+ enc := json.NewEncoder(ctx.Resp)
if err := enc.Encode(er); err != nil {
log.Error("Failed to encode error response as json. Error: %v", err)
}