deserialize static method
Converts a serialized document to ejson format map.
Implementation
static Map<String, dynamic> deserialize(BsonBinary buffer,
{bool relaxed = false}) {
buffer.offset = 0;
if (buffer.byteList.length < 5) {
throw Exception('corrupt bson message < 5 bytes long');
}
return BsonMap.fromBuffer(buffer).eJson(relaxed: relaxed);
}