Open
Description
After retrieving data from database like:
use mongodb::bson::from_document;
let data = from_document::<Value>(bson_document)?;
I'm not able to serialize data to json with custom datetime format getting datetime fields like:
...
"updated_at": {
"$date": "2021-02-01T14:50:01.504Z"
},
...
I can't use serde helpers, since i don't know the data schema. The only solution i see right now is to manually iterate all fields in bson_document
recursively and in case of Bson::DateTime
type convert it to Bson::String
type with desired datetime format. Is there a better solution?