jsonutils

package module
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Jan 9, 2026 License: MIT Imports: 3 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetByPath

func GetByPath(path string, data any) (any, bool)

Get data by supplying a path

func GetJson

func GetJson[T any](jsonStr string) T

Get data from jsonStr (without error)

func GetJsonSafe

func GetJsonSafe[T any](jsonStr string) (T, error)

Get data from jsonStr (returns error)

func Pretty

func Pretty[T any](obj T) string

Prettify data into jsonStr

func ToJson

func ToJson[T any](obj T) string

Get jsonStr from data (without error)

func ToJsonSafe

func ToJsonSafe[T any](obj T) (string, error)

Get jsonStr from data (returns error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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