bson

package
v0.0.0-...-86643de Latest Latest
Warning

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

Go to latest
Published: May 10, 2019 License: BSD-2-Clause Imports: 2 Imported by: 2

Documentation

Overview

A codec for handling BSON encoding and decoding

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BsonCodec

type BsonCodec struct{}

BsonCodec converts objects to and from BSON.

func (*BsonCodec) CanMarshalWithCallback

func (b *BsonCodec) CanMarshalWithCallback() bool

CanMarshalWithCallback returns whether this codec is capable of marshalling a response containing a callback.

func (*BsonCodec) ContentType

func (b *BsonCodec) ContentType() string

ContentType returns the content type for this codec.

func (*BsonCodec) FileExtension

func (b *BsonCodec) FileExtension() string

FileExtension returns the file extension for this codec.

func (*BsonCodec) Marshal

func (b *BsonCodec) Marshal(object interface{}, options map[string]interface{}) ([]byte, error)

Marshal converts an object to BSON.

func (*BsonCodec) Unmarshal

func (b *BsonCodec) Unmarshal(data []byte, obj interface{}) error

Unmarshal converts JSON into an object.

Jump to

Keyboard shortcuts

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