jsonpp

package module
v0.0.0-...-9cce0f9 Latest Latest
Warning

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

Go to latest
Published: Aug 10, 2025 License: MIT Imports: 5 Imported by: 0

README

go-jsonpp

Package jsonpp provides tools for pretty printing JSON.

jsonpp = json pretty print

Documention

Online documentation, which includes examples, can be found at: http://godoc.org/github.com/reiver/go-jsonpp

GoDoc

Example

Here is an example usage:

import "github.com/reiver/go-jsonpp"

// ...


var jsn []byte // <--- contains JSON

// ...

jsonpp.PrettyPrint(jsn) // outputs the pretty-printed JSON to the STDOUT.

Can also send it to an io.Writer

import "github.com/reiver/go-jsonpp"

// ...


var jsn []byte // <--- contains JSON

// ...

jsonpp.FPrettyPrint(writer, jsn) // outputs the pretty-printed JSON to an io.Writer.

Or return it as a string:

import "github.com/reiver/go-jsonpp"

// ...


var jsn []byte // <--- contains JSON

// ...

s := jsonpp.SPrettyPrint(jsn) // returns the pretty-printed JSON as a string.

Import

To import package jsonpp use import code like the follownig:

import "github.com/reiver/go-jsonpp"

Installation

To install package jsonpp do the following:

GOPROXY=direct go get github.com/reiver/go-jsonpp

Author

Package jsonpp was written by Charles Iliya Krempeaux

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FPrettyPrint

func FPrettyPrint(writer io.Writer, json []byte) error

func PrettyPrint

func PrettyPrint(json []byte) error

func SPrettyPrint

func SPrettyPrint(json []byte) string

Types

This section is empty.

Jump to

Keyboard shortcuts

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