My mongoDb collection looks like this:
> db.FakeCollection.find().pretty()
{
"_id" : ObjectId("52b2d71c5c197846fd3a2737"),
"categories" : [
{
"categoryname" : "entertainment",
"categoryId" : "d3ffca550ae44904aedf77cdcbd31d7a",
"displayname" : "Entertainment",
"subcategories" : [
{
"subcategoryname" : "games",
"subcategoryId" : "ff3d0cbeb0eb4960b11b47d7fc64991b",
"displayname" : "Games"
}
]
}
]
}
I want to write a test case for the below collection using Specs2 JsonMatchers in scala with MongodbCasbah. How do I convert DBObjects to Strings?