Module BSON
In: lib/bson.rb
lib/bson/bson_c.rb
lib/bson/bson_java.rb
lib/bson/byte_buffer.rb
lib/bson/exceptions.rb
lib/bson/types/code.rb
lib/bson/types/binary.rb
lib/bson/types/timestamp.rb
lib/bson/types/dbref.rb
lib/bson/types/min_max_keys.rb
lib/bson/types/object_id.rb
lib/bson/bson_ruby.rb
lib/bson/ordered_hash.rb

A hash in which the order of keys are preserved.

Under Ruby 1.9 and greater, this class has no added methods because Ruby‘s Hash already keeps its keys ordered by order of insertion.

Methods

Classes and Modules

Class BSON::BSONError
Class BSON::BSON_C
Class BSON::BSON_JAVA
Class BSON::BSON_RUBY
Class BSON::Binary
Class BSON::ByteBuffer
Class BSON::Code
Class BSON::DBRef
Class BSON::InvalidDocument
Class BSON::InvalidKeyName
Class BSON::InvalidObjectId
Class BSON::InvalidStringEncoding
Class BSON::MaxKey
Class BSON::MinKey
Class BSON::MongoDBError
Class BSON::MongoRubyError
Class BSON::ObjectId
Class BSON::OrderedHash
Class BSON::Timestamp

Constants

DEFAULT_MAX_BSON_SIZE = Mongo::DEFAULT_MAX_BSON_SIZE
DEFAULT_MAX_BSON_SIZE = 4 * 1024 * 1024
BSON_CODER = BSON_JAVA
BSON_CODER = BSON_C
BSON_CODER = BSON_RUBY
NULL_BYTE = "\x00"

Public Class methods

Reads a single BSON document from an IO object. This method is used in the executable b2json, bundled with the bson gem, for reading a file of bson documents.

@param [IO] io an io object containing a bson object.

@return [ByteBuffer]

[Validate]