jsonx

package
v2.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2022 License: BSD-2-Clause Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Marshal

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

Marshal encode value to json string, without html escape

func MarshalIndent

func MarshalIndent(v interface{}, indent string) (string, error)

MarshalIndent is like Marshal but applies Indent to format the output. Each JSON element in the output will begin on a new line beginning with prefix followed by one or more copies of indent according to the indentation nesting.

func UnMarshal

func UnMarshal[T any](jsonStr string) (T, error)

UnMarshal parse json encoded string to value, return the value.

func UnMarshalPtr

func UnMarshalPtr[T any](jsonStr string) (*T, error)

UnMarshalPtr parse json encoded string to value, return the pointer to value.

Types

This section is empty.

Jump to

Keyboard shortcuts

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