sql >> Base de Datos >  >> NoSQL >> MongoDB

Convertir MongoDBObject a JsValue

Así es como lo hace para Play 2.1 (documentación )

val dbo = MongoDBObject("id" -> "0001", "name" -> "Kevin", "age" -> "100") 
val json: JsValue = Json.parse(dbo.toString)