jsonutils

package
v0.0.0-...-b593ba2 Latest Latest
Warning

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

Go to latest
Published: May 29, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ReadJSONDescriptor

func ReadJSONDescriptor(jsonFile *os.File, data interface{}) error

ReadJSONDescriptor reads a .JSON file. Behaves as Go's built-in encoding/json.Unmarshal() but accepts a file descriptor instead of a byte slice.

func ReadJSONFile

func ReadJSONFile(path string, data interface{}) error

ReadJSONFile reads a .JSON file. Behaves as Go's built-in encoding/json.Unmarshal() but accepts a file path instead of a byte slice.

func WriteJSONDescriptor

func WriteJSONDescriptor(jsonFile *os.File, data interface{}) error

WriteJSONFile writes a .JSON file. Behaves as Go's built-in encoding/json.MarshalIndent() but accepts a file descriptor in addition to the data.

func WriteJSONFile

func WriteJSONFile(outputFilePath string, data interface{}) error

WriteJSONFile writes a .JSON file. Behaves as Go's built-in encoding/json.MarshalIndent() but accepts a file path in addition to the data.

Types

This section is empty.

Jump to

Keyboard shortcuts

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