json

package
v0.0.0-...-6324481 Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2020 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Marshal

func Marshal(w io.Writer, v interface{}) error

Marshal encodes v as JSON into w.

func NewDecoder

func NewDecoder(r io.Reader) *jsoniter.Decoder

NewDecoder creates a new JSON decoder.

func NewEncoder

func NewEncoder(w io.Writer) *jsoniter.Encoder

NewEncoder creates a new JSON encoder.

func Unmarshal

func Unmarshal(r io.Reader, v interface{}) error

Unmarshal decodes JSON from a reader into v.

func UnmarshalRaw

func UnmarshalRaw(raw RawMessage, v interface{}) error

UnmarshalRaw decodes a raw JSON message into v.

func UnmarshalZlib

func UnmarshalZlib(r io.Reader, v interface{}) error

UnmarshalZlib is a helper func to decompress a zlib stream and unmarshal JSON.

Types

type RawMessage

type RawMessage jsoniter.RawMessage

RawMessage is an alias for jsoniter.RawMessage

Jump to

Keyboard shortcuts

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