jsonutil

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 7, 2026 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MarshalMapString

func MarshalMapString[K comparable, V any](m map[K]V) (string, error)

MarshalMapString marshals a map to a JSON string, substituting an empty map when nil.

func MarshalSliceString

func MarshalSliceString[T any](values []T) (string, error)

MarshalSliceString marshals a slice to a JSON string, substituting an empty slice when nil.

func MarshalString

func MarshalString[T any](value T) (string, error)

MarshalString marshals the provided value to a JSON string.

func Unmarshal

func Unmarshal[T any](data []byte) (T, error)

Unmarshal decodes data as JSON into T.

func UnmarshalString

func UnmarshalString[T any](data string) (T, error)

UnmarshalString decodes a JSON string into T.

Types

This section is empty.

Jump to

Keyboard shortcuts

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