Created
January 10, 2015 14:16
-
-
Save NicolaeNMV/80e8edc1682e1b01ffcd to your computer and use it in GitHub Desktop.
Solve ReactiveMongo playframework scala "No implicit format for reactivemongo.bson.BSONObjectID available."
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import play.api.libs.json.{Json, Format} | |
// If you imported | |
import play.modules.reactivemongo.json.BSONFormats.BSONObjectIDFormat | |
// And still getting No implicit format for reactivemongo.bson.BSONObjectID available. error | |
// Check that your JSON formatter is typed. Change | |
implicit val mongoFormat = Json.format[Category] | |
// to | |
implicit val mongoFormat: Format[Category] = Json.format[Category] | |
// This seem to help scala compiler to find all the implicit types |
RezaBidar
commented
Nov 16, 2017
•
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment