Files
nuclei/pkg/utils/json/json.go
Dwi Siswanto dd8946d3f2 chore: satisfy lints
Signed-off-by: Dwi Siswanto <git@dw1.io>
2025-10-30 09:41:01 +07:00

28 lines
592 B
Go

//go:build (linux || darwin || windows) && (amd64 || arm64)
package json
import "github.com/bytedance/sonic"
var api = sonic.ConfigStd
// Exported functions from the [sonic.API].
var (
Marshal = api.Marshal
Unmarshal = api.Unmarshal
MarshalIndent = api.MarshalIndent
NewDecoder = api.NewDecoder
NewEncoder = api.NewEncoder
)
// Encoder is a JSON encoder.
type Encoder = sonic.Encoder
// Decoder is a JSON decoder.
type Decoder = sonic.Decoder
// SetConfig sets the configuration for the JSON package.
func SetConfig(config *sonic.Config) {
api = config.Froze()
}