json

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2019 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package json contains marshaler implementations that use Go's standard JSON marshaling.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Codec

type Codec struct{}

Codec is an implementation of marshaling.Codec that uses Go's standard JSON implementation.

func (*Codec) Marshal

func (*Codec) Marshal(v interface{}) ([]byte, error)

Marshal returns the binary representation of v.

func (*Codec) MediaType

func (*Codec) MediaType() string

MediaType returns the media-type used to identify data encoded by this codec.

func (*Codec) Query

func (*Codec) Query(types []reflect.Type) marshaling.CodecCapabilities

Query returns the capabilities of the codec for the given types.

func (*Codec) Unmarshal

func (*Codec) Unmarshal(data []byte, v interface{}) error

Unmarshal decodes a binary representation into v.

Jump to

Keyboard shortcuts

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