add bson_as_json() to convert to extended json format.