milvus/internal/json/sonic.go
shaoyue 0417463e90
enhance: Gin & restfulv1 handler use sonic json (#35018)
/cc @czs007 @congqixia 
master pr: #35020

Signed-off-by: haorenfsa <haorenfsa@gmail.com>
2024-07-29 00:39:49 +08:00

24 lines
529 B
Go

package json
import (
gojson "encoding/json"
"github.com/bytedance/sonic"
)
var (
json = sonic.ConfigStd
// 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
)
type Number = gojson.Number