jsonutil

package
v0.0.0-...-c39e8e5 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2022 License: AGPL-3.0 Imports: 6 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Format

func Format(bs []byte) ([]byte, error)

Format pretty formats JSON data bytes.

func Fprint

func Fprint(w io.Writer, v interface{}) error

Fprint pretty prints a JSON data blob into a writer.

func Print

func Print(v interface{})

Print pretty prints a JSON data blob into stdout.

func ReadFile

func ReadFile(file string, obj interface{}) error

ReadFile reads and unmarshals a JSON file.

func WriteFile

func WriteFile(file string, obj interface{}) error

WriteFile marshals a JSON object and writes it into a file.

func WriteFileReadable

func WriteFileReadable(f string, v interface{}) error

WriteFileReadable marshals a JSON object with indents and writes it into a file.

Types

This section is empty.

Jump to

Keyboard shortcuts

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