I added the following to mongodb via the cli:
db.gobble.save( {"joke":"What did the duck say to the donkey after
they chased the chicken across the road?","answer":"Quack."} );
db.gobble.save( {"joke":"How can you tell if there is an elephant in
your refridgerator?","answer":"Footprints in the jello."} );
Then went to the following handy dandy place to validate:
...and was good to go. Then I used the HTTP interface to get that
collection, by going to this url:
http://127.0.0.1:28017/spleen/gobble/
And I get this output:
{
"offset" : 0,
"rows": [
{ "_id" : "4a3758b2b56d59721a19c15e", "joke" : "What did the duck
say to the donkey after they chased the chicken across the road?",
"answer" : "Quack." } ,
{ "_id" : "4a3758dab56d59721a19c15f", "joke" : "How can you tell
if there is an elephant in your refridgerator?", "answer" :
"Footprints in the jello." }
]
"total_rows" : 2 ,
"query" : {} ,
"millis" : 0 ,
}
...which of course doesn't validate. Do you see what I see at the end
there? Should be this:
{
"offset" : 0,
"rows": [
{ "_id" : "4a3758b2b56d59721a19c15e", "joke" : "What did the duck
say to the donkey after they chased the chicken across the road?",
"answer" : "Quack." } ,
{ "_id" : "4a3758dab56d59721a19c15f", "joke" : "How can you tell
if there is an elephant in your refridgerator?", "answer" :
"Footprints in the jello." }
],
"total_rows" : 2 ,
"query" : {} ,
"millis" : 0
}
Looks like there's a missing comma after the last right bracket, and
an extra comma after the last element.
-- Mitch