json

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: Jan 2, 2026 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MarshalJSONWithSorting

func MarshalJSONWithSorting(input interface{}) ([]byte, error)

MarshalJSONWithSorting marshals JSON with keys sorted by alphabet, same rule as marshalling map

When called from a Marshaller, the input should be a new/derived type without Marshaller defined to prevent infinite recursion

func MarshalToJSONFile

func MarshalToJSONFile(filepath string, input interface{}) error

MarshalToJSONFile marshals structure to a JSON file at the specified path

func UnmarshalFromJSONFile

func UnmarshalFromJSONFile(filepath string, outputPtr interface{}) error

UnmarshalFromJSONFile unmarshals JSON file at the specified path

Types

This section is empty.

Jump to

Keyboard shortcuts

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