milvus/internal/json/sonic.go
shaoyue 1db099973f
enhance: Gin & restfulv1 handler use sonic json (#35020)
/cc @czs007 @congqixia 
/kind enhancement

Signed-off-by: haorenfsa <haorenfsa@gmail.com>
2024-08-05 16:44:17 +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