lib/bson/hash.rb
def from_bson(bson)
        hash = new
        bson.read(4) # Swallow the first four bytes.
        while (type = bson.readbyte.chr) != NULL_BYTE
          field = bson.gets(NULL_BYTE).from_bson_string.chop!
          hash[field] = BSON::Registry.get(type).from_bson(bson)
        end
        hash
      end
# Deserialize the hash from BSON.
#
# @param [ IO ] bson The bson representing a hash.
#
# @return [ Array ] The decoded hash.
#
# @see http://bsonspec.org/#/specification
#
# @since 2.0.0
Deserialize the hash from BSON.
Deserialize the hash from BSON .
def from_bson(bson)
        hash = new
        bson.read(4) 
        while (type = bson.readbyte.chr) != NULL_BYTE
          field = bson.gets(NULL_BYTE).from_bson_string.chop!
          hash[field] = BSON::Registry.get(type).from_bson(bson)
        end
        hash
      end
def from_bson ( bson ) hash = new bson . read ( 4 ) while ( type = bson . readbyte . chr ) != NULL_BYTE field = bson . gets ( NULL_BYTE ) . from_bson_string . chop! hash [ field ] = BSON :: Registry . get ( type ) . from_bson ( bson ) end hash end
Deserialize the hash from BSON.
Deserialize the hash from BSON .
# Swallow the first four bytes.
The decoded hash.
The decoded hash .
 Array 
bson
bson The bson representing a hash.
bson The bson representing a hash .
see
None
since
None