xjson

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Sep 29, 2022 License: GPL-2.0 Imports: 5 Imported by: 0

Documentation

Overview

---------------------------------------------------------------------//

GNU GENERAL PUBLIC LICENSE                       //
   Version 2, June 1991                          //
                                                 //

Copyright (C) Wells Hsu, wellshsu@outlook.com, All rights reserved. // Everyone is permitted to copy and distribute verbatim copies // of this license document, but changing it is not allowed. //

SEE LICENSE.md FOR MORE DETAILS.                   //

---------------------------------------------------------------------//

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