jsonhelper

package module
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Jan 23, 2025 License: MIT Imports: 3 Imported by: 2

README

jsonhelper

Go Reference

Helpers for Go's json package.

Documentation

Overview

Package jsonhelper contains json package helpers.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultAny added in v0.3.0

func DefaultAny(v any) (string, error)

DefaultAny returns the default indented JSON encoding of 'v' as string.

func DefaultStr added in v0.3.0

func DefaultStr(j string) (string, error)

DefaultStr returns the default indented form of JSON string 'j'.

func IndentAny added in v0.2.0

func IndentAny(v any, prefix, indent string) (string, error)

IndentAny returns the indented JSON encoding of 'v' as string. (See json.Indent for 'prefix' and 'indent' usage.)

func IndentRW added in v0.0.2

func IndentRW(r io.Reader, w io.Writer, prefix, indent string) error

IndentRW reads JSON data from io.Reader and writes indented data to io.Writer. (See json.Indent for 'prefix' and 'indent' usage.)

func IndentStr added in v0.0.2

func IndentStr(j, prefix, indent string) (string, error)

IndentStr returns the indented form of JSON string 'j'. (See json.Indent for 'prefix' and 'indent' usage.)

Types

This section is empty.

Jump to

Keyboard shortcuts

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