jsonx

package
v0.29.0 Latest Latest
Warning

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

Go to latest
Published: Jul 12, 2026 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

Package jsonx provides generic helpers for JSON encoding/decoding and conversion between structs and maps.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AnyToStruct

func AnyToStruct(data any, target any) error

func FromJSON

func FromJSON[T any](jsonStr string, target T) error

func MapTo

func MapTo[T any](m map[string]any) (T, error)

func MapToArray

func MapToArray[T any](m []map[string]any) ([]T, error)

func ToJSON

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

func ToMap

func ToMap[T any](t T) (map[string]any, error)

func ToMapArray

func ToMapArray[T any](t []T) ([]map[string]any, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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