github.com/wfusion/gofusion@v1.1.14/common/utils/serialize/json/sonic.go (about)

     1  // Fork from github.com/gin-gonic/gin/internal/json@v1.9.1
     2  
     3  // Copyright 2022 Gin Core Team. All rights reserved.
     4  // Use of this source code is governed by a MIT style
     5  // license that can be found in the LICENSE file.
     6  
     7  //go:build sonic && avx && (linux || windows || darwin) && amd64
     8  
     9  package json
    10  
    11  import "github.com/bytedance/sonic"
    12  
    13  var (
    14  	json = sonic.ConfigStd
    15  	// Marshal is exported by gin/json package.
    16  	Marshal = json.Marshal
    17  	// Unmarshal is exported by gin/json package.
    18  	Unmarshal = json.Unmarshal
    19  	// MarshalIndent is exported by gin/json package.
    20  	MarshalIndent = json.MarshalIndent
    21  	// NewDecoder is exported by gin/json package.
    22  	NewDecoder = json.NewDecoder
    23  	// NewEncoder is exported by gin/json package.
    24  	NewEncoder = json.NewEncoder
    25  )