deserialize static method
dynamic
deserialize(
- BsonBinary buffer, {
- SerializationType serializationType = SerializationType.bson,
- dynamic typeByte = bsonDataObject,
- bool relaxed = false,
Implementation
static dynamic deserialize(BsonBinary buffer,
{SerializationType serializationType = SerializationType.bson,
typeByte = bsonDataObject,
bool relaxed = false}) {
buffer.offset = 0;
var bsonObject = BsonObject.fromTypeByteAndBuffer(typeByte, buffer);
if (serializationType == SerializationType.ejson) {
return bsonObject.eJson(relaxed: relaxed);
}
return bsonObject.value;
}