json

package
v0.49.0 Latest Latest
Warning

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

Go to latest
Published: Nov 30, 2020 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package json is a concrete implementation of the encoding abstractions.

Index

Constants

View Source
const (
	// Type JSON definition.
	Type string = "application/json"
	// TypeCharset JSON definition with charset.
	TypeCharset 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