json

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: May 3, 2020 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package json provides a JSON presenter that formatting.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Presenter

type Presenter struct {
	// contains filtered or unexported fields
}

Presenter is a presenter that formats v into JSON string.

func NewPresenter

func NewPresenter(indent string) *Presenter

NewPresenter instantiates a JSON presenter. If indent is not empty, Format indents the output.

func (*Presenter) Format

func (p *Presenter) Format(v interface{}) (string, error)

Format formats v into JSON string.

Jump to

Keyboard shortcuts

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