json

package
v0.0.0-...-d2438c5 Latest Latest
Warning

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

Go to latest
Published: Jun 20, 2019 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Debug

func Debug(r *bytes.Buffer, logger log.Logger)

Debug consumes a bytes.Buffer and indents the JSON in a pretty output.

func Read

func Read(r io.Reader, req interface{}) error

Read consumes a io.Reader data and unmarshals it directly from JSON

func Write

func Write(w http.ResponseWriter, body interface{}, debug bool, logger log.Logger) error

Write encodes the body as JSON and sends it back to the client

Types

This section is empty.

Jump to

Keyboard shortcuts

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