encoding

package
v0.0.0-...-3b2228a Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2013 License: BSD-2-Clause Imports: 2 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MarshalJSON

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

This encodes it as bson as an intermediate step to take advantage of the `inline` tag to support arbirtary fields. This can be used as an alternate to `json.Marshal`. See: http://godoc.org/labix.org/v2/mgo/bson#Marshal

func UnmarshalJSON

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

This decodes it as json into an intermediate map, encodes it into BSON, the decodes it back into the store. This take advantages of the `inline` tag to support arbirtary fields. This can be used as an alternate to `json.Unmarshal` See: http://godoc.org/labix.org/v2/mgo/bson#Marshal

Types

This section is empty.

Jump to

Keyboard shortcuts

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