jsonx

package
v1.9.5 Latest Latest
Warning

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

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

Documentation

Overview

Package jsonx provides helpers for json in/out operations

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrObjectExpected is returned when a JSON round-trip does not produce an object
	ErrObjectExpected = errors.New("json value is not an object")
)

Functions

func RoundTrip

func RoundTrip(input any, output any) error

RoundTrip marshals input to JSON and unmarshals it into output

func ToMap

func ToMap(value any) (map[string]any, error)

ToMap converts an arbitrary value into a JSON object map

Types

This section is empty.

Jump to

Keyboard shortcuts

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