Class: BSON::BSON_C

Inherits:
Object
  • Object
show all
Defined in:
lib/bson/bson_c.rb

Class Method Summary collapse

Class Method Details

.deserialize(buf = nil) ⇒ Object



27
28
29
# File 'lib/bson/bson_c.rb', line 27

def self.deserialize(buf=nil)
  CBson.deserialize(ByteBuffer.new(buf).to_s)
end

.serialize(obj, check_keys = false, move_id = false) ⇒ Object



23
24
25
# File 'lib/bson/bson_c.rb', line 23

def self.serialize(obj, check_keys=false, move_id=false)
  ByteBuffer.new(CBson.serialize(obj, check_keys, move_id))
end