xjson

package
v1.2.4 Latest Latest
Warning

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

Go to latest
Published: Feb 14, 2023 License: GPL-2.0, GPL-2.0 Imports: 5 Imported by: 0

Documentation

Overview

提供对json序列化/反序列化的支持.

Index

Constants

This section is empty.

Variables

View Source
var (
	TO_OBJ_INVALID_PARAM  = errors.New("xjson.ToObj invalid param")      // 错误:不合法的参数
	TO_OBJ_PARSE_ERROR    = errors.New("xjson.ToObj parse content fail") // 错误:解析内容失败
	TO_OBJ_UNSUPPORT_DATA = errors.New("xjson.ToObj unsupport type")     // 错误:不支持的类型
)

Functions

func ToByte

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

对象转字节数组

func ToObj

func ToObj(data interface{}, obj interface{}) error

字符串/字节数组转对象(指针)

func ToPrint

func ToPrint(v interface{}) string

对象转字符串输出

func ToString

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

对象转字符串

Types

This section is empty.

Jump to

Keyboard shortcuts

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