mirror of
https://github.com/go-gitea/gitea
synced 2025-07-22 18:28:37 +00:00
Upgrade xorm to v1.1.1 (#16339)
This commit is contained in:
28
vendor/xorm.io/xorm/internal/json/jsoniter.go
generated
vendored
Normal file
28
vendor/xorm.io/xorm/internal/json/jsoniter.go
generated
vendored
Normal file
@@ -0,0 +1,28 @@
|
||||
// Copyright 2021 The Xorm Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
// +build jsoniter
|
||||
|
||||
package json
|
||||
|
||||
import (
|
||||
jsoniter "github.com/json-iterator/go"
|
||||
)
|
||||
|
||||
func init() {
|
||||
DefaultJSONHandler = JSONiter{}
|
||||
}
|
||||
|
||||
// JSONiter implements JSONInterface via jsoniter
|
||||
type JSONiter struct{}
|
||||
|
||||
// Marshal implements JSONInterface
|
||||
func (JSONiter) Marshal(v interface{}) ([]byte, error) {
|
||||
return jsoniter.Marshal(v)
|
||||
}
|
||||
|
||||
// Unmarshal implements JSONInterface
|
||||
func (JSONiter) Unmarshal(data []byte, v interface{}) error {
|
||||
return jsoniter.Unmarshal(data, v)
|
||||
}
|
Reference in New Issue
Block a user