What would be the best way to convert a bson to a document that is suitable for inserting into the database?