phjson

package
v1.10.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 29, 2026 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ConfigDefault is the default config of APIs, aiming at efficiency and safety.
	ConfigDefault sonic.API
)

Functions

func GetConfig

func GetConfig() sonic.API

GetConfig returns the default configuration for sonic APIs.

func Marshal

func Marshal(v interface{}) ([]byte, error)

Marshal encodes the given data into a JSON byte slice using sonic.

func MarshalIndent

func MarshalIndent(v interface{}, prefix, indent string) ([]byte, error)

MarshalIndent encodes the given data into a JSON byte slice using sonic, with indentation.

func NewConfig

func NewConfig(config *sonic.Config)

NewConfig initializes the default configuration for sonic APIs.

func Unmarshal

func Unmarshal(data []byte, v interface{}) error

Unmarshal decodes the given JSON byte slice into the given interface using sonic.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL