jsonx

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Jan 16, 2025 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ToDynamicJSON

func ToDynamicJSON(val any) (map[string]any, error)

ToDynamicJSON converts any Go value to a dynamic JSON object represented as a map[string]any. It first marshals the input value to JSON bytes and then unmarshals those bytes into a map. If either the marshaling or unmarshaling process fails, an error is returned.

Parameters:

  • val: The input value of any type to be converted to a dynamic JSON object.

Returns:

  • map[string]any: A map representing the dynamic JSON object.
  • error: An error if the conversion fails, otherwise nil.

Types

This section is empty.

Jump to

Keyboard shortcuts

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