json

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2025 License: Apache-2.0 Imports: 5 Imported by: 58

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Read added in v0.3.4

func Read(reader io.Reader, value interface{}) error

Read will read JSON data from reader and write the decoded data to value. If the JSON data are newline separated, lines beginning with comments will be ignored (correcting a controlling and arrogant mistake of the original author of the JSON specification). Comment lines may begin with "#", "//" or "!" and continue until the next newline.

func ReadFromFile

func ReadFromFile(filename string, value interface{}) error

Read will read JSON data from the specified file and write the decoded data to value. If the JSON data are newline separated, lines beginning with comments will be ignored (correcting a controlling and arrogant mistake of the original author of the JSON specification). Comment lines may begin with "#", "//" or "!" and continue until the next newline.

func WriteToFile

func WriteToFile(filename string, perm os.FileMode, indent string,
	value interface{}) error

func WriteWithIndent

func WriteWithIndent(w io.Writer, indent string, value interface{}) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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