json

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: May 22, 2020 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Marshal

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

Marshal returns the JSON encoding of v

func MarshalIndent

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

MarshalIndent is like Marshal but applies Indent to format the output

func ReadFile

func ReadFile(filename string, result interface{}) error

ReadFile reads json from file and unmarshal into result

func Unmarshal

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

Unmarshal parses the JSON-encoded data and stores the result in the value pointed to by v.

func WriteFile

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

WriteFile marshals data and writes to file

Types

This section is empty.

Jump to

Keyboard shortcuts

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