xjson

package
v1.2.3 Latest Latest
Warning

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

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

Documentation

Overview

Copyright (C) Wells Hsu, wellshsu@github.com, All rights reserved. Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. This license is based on GPL, SEE LICENSE.md FOR MORE DETAILS. Package xjson: 提供对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