json

package
v0.0.0-...-1da4b03 Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2025 License: GPL-3.0 Imports: 2 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// Valid 验证
	Valid = json.Valid
	// Unmarshal 反序列化
	Unmarshal = json.Unmarshal
	// MarshalIndent 带缩进的序列化
	MarshalIndent = json.MarshalIndent
)

Functions

func Bytes

func Bytes(s string) []byte

Bytes 内存地址转换string

func JSON2PB

func JSON2PB(js string, pb interface{}) error

JSON2PB json字符串转pb2格式

func Marshal

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

Marshal json.MarshalWithOption

func MarshalToString

func MarshalToString(v interface{}) (string, error)

MarshalToString json.MarshalWithOption and return string

func PB2Json

func PB2Json(pb interface{}) []byte

PB2Json pb2格式转换为json []byte格式

func PB2String

func PB2String(pb interface{}) string

PB2String pb2格式转换为json 字符串格式

func String

func String(b []byte) string

String 内存地址转换[]byte

func UnmarshalFromString

func UnmarshalFromString(data string, v interface{}) error

UnmarshalFromString json.UnmarshalFromString

Types

This section is empty.

Jump to

Keyboard shortcuts

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