Help us shape the future of Go! Take the 2026 Go Developer Survey

json

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ReformatJson

func ReformatJson(str string, sortArrays bool, exclude []string) string

ReformatJson makes a given JSON pretty by adding indentation. Moreover, it can sort all arrays in the given JSON if you set sortArrays to true.

func ToJson

func ToJson(v any, sortArrays bool, exclude []string) string

ToJson converts the given value into a JSON. Moreover, it can sort all arrays in the value before marshalling if you set sortArrays to true.

Types

This section is empty.

Jump to

Keyboard shortcuts

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