Module Mongo::Protocol::Serializers::Document
In: lib/mongo/protocol/serializers.rb

MongoDB wire protocol serialization strategy for a BSON Document.

Serializes and de-serializes a single document.

Methods

Public Class methods

Deserializes a document from the IO stream

@param [ String ] buffer Buffer containing the BSON encoded document.

@return [ Hash ] The decoded BSON document.

Serializes a document into the buffer

@param buffer [ String ] Buffer to receive the BSON encoded document. @param value [ Hash ] Document to serialize as BSON.

@return [ String ] Buffer with serialized value.

Whether there can be a size limit on this type after serialization.

@return [ true ] Documents can be size limited upon serialization.

@since 2.0.0

[Validate]