BSON serialize/deserialize methods