package
Version:
v0.7.1
Opens a new window with list of versions in this module.
Published: May 28, 2026
License: MIT
Opens a new window with license information.
Imports: 4
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
Package jsonutil provides utility functions for working with JSON files,
including secure file loading and pretty-printing of JSON data.
LoadFile reads a JSON file at the given path into a typed object.
Parameters:
- path: the file path to read
Returns:
- *T: pointer to the decoded object
- error: if the file cannot be read or decoded
Pretty returns a pretty-printed JSON string representation of the given object.
Parameters:
- object: the value to marshal as JSON
Returns:
- string: the pretty-printed JSON
- error: if marshaling fails
Source Files
¶
Click to show internal directories.
Click to hide internal directories.