How do i convert mongo ObjectId to string id and vice versa in akka-http for JSON response For this User class
case class User(_id: ObjectId, email: String, name: Option[String], birthDate: Option[String])
this jsonFormat4 doesn't work.
implicit val userFormat = jsonFormat4(User.apply)
This error is thrown.
Error:(21, 40) could not find implicit value for evidence parameter of type JsonSupport.this.JF[org.mongodb.scala.bson.ObjectId] implicit val userFormat = jsonFormat4(User.apply)