I am currently upgrading from an old version of reactive mongo, 0.12.7, to 1.1.0. In 0.12.7, I was able to serialize a Date into JSON and insert it into mongo with the following serializer:
implicit val mongoJodaWrites = new Writes[org.joda.time.DateTime] {
def writes(o: org.joda.time.DateTime): JsValue = {
Json.obj("$date" -> o.getMillis)
}
val jsObj = Json.toJson(obj)
coll.insert(jsObj)
And it would be inserted correctly in mongo as a Date. Now that I've upgraded, the date isn't inserted correctly, it is inserted as raw json, seemingly ignoring extended json . (see screenshots).