jsonutil

package
v0.0.0-...-16d7efa Latest Latest
Warning

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

Go to latest
Published: May 7, 2026 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Hash

func Hash(data any) (string, error)

Hash computes the SHA-256 hash of the provided JSON data.

The function ensures that different representations of the same JSON data (e.g., with fields in different orders) will produce the same hash. This is achieved by parsing the input JSON into a normalized format before hashing.

func ToJSON

func ToJSON(s string) map[string]any

ToJSON converts a JSON string to a map.

func ToString

func ToString(m any) string

ToString converts a map to a JSON string.

Types

This section is empty.

Jump to

Keyboard shortcuts

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