json

package
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2018 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// ContentType JSON definition
	ContentType string = "application/json"
	// ContentTypeCharset JSON definition with charset
	ContentTypeCharset string = "application/json; charset=utf-8"
)

Variables

This section is empty.

Functions

func Decode

func Decode(data io.Reader, v interface{}) error

Decode a JSON input in the form of a read.

func DecodeRaw

func DecodeRaw(data []byte, v interface{}) error

DecodeRaw a JSON input in the form of a byte slice.

func Encode

func Encode(v interface{}) ([]byte, error)

Encode a model to JSON.

Types

This section is empty.

Jump to

Keyboard shortcuts

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