jsonutil

package
v0.0.0-...-754e97a Latest Latest
Warning

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

Go to latest
Published: Sep 18, 2020 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Decode

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

Decode decode json bytes to data. use it instead of json.Unmarshal

func Encode

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

Encode encode data to json bytes. use it instead of json.Marshal

func Pretty

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

Pretty get pretty JSON string

func ReadFile

func ReadFile(filePath string, v interface{}) error

ReadFile Read JSON file data

func StripComments

func StripComments(src string) string

StripComments strip comments for a JSON string

func WriteFile

func WriteFile(filePath string, data interface{}) error

WriteFile write data to JSON file

Types

This section is empty.

Jump to

Keyboard shortcuts

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