我正在使用Play框架和Scala进行登录过程,我收到以下错误:
No Json serializer as JsObject found for type play.api.libs.json.JsValue. Try to implement an implicit OWrites or OFormat for this type
这是我的型号代码。我做错了什么?
def checkUser(user: Signin): Future[Option[Signin]] = {
val query = BSONDocument("_email" -> user.email, "password" -> user.password)
collection.flatMap(_.find(query).requireOne[Signin])
}