encoding

package
v0.3.5 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2023 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FromJson

func FromJson(raw []byte, any interface{}) interface{}

decode JSON byte string into specified variable; panic in case of any error

func FromJsonString

func FromJsonString(str string, any interface{}) interface{}

decode JSON string into specified variable; panic in case of any error

func FromYaml

func FromYaml(raw []byte, any interface{}) interface{}

decode YAML byte string into specified variable; panic in case of any error

func FromYamlString

func FromYamlString(str string, any interface{}) interface{}

decode YAML string into specified variable; panic in case of any error

func ToJson

func ToJson(any interface{}) []byte

encode specified variable into JSON byte string; panic in case of any error

func ToJsonString

func ToJsonString(any interface{}) string

encode specified variable into JSON string; panic in case of any error

func ToPrettyJson

func ToPrettyJson(any interface{}) []byte

encode specified variable into prettified JSON byte string; panic in case of any error

func ToPrettyJsonString

func ToPrettyJsonString(any interface{}) string

encode specified variable into prettified JSON string; panic in case of any error

func ToYaml

func ToYaml(any interface{}) []byte

encode specified variable into YAML byte string; panic in case of any error

func ToYamlString

func ToYamlString(any interface{}) string

encode specified variable into YAML string; panic in case of any error

Types

This section is empty.

Jump to

Keyboard shortcuts

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