std::string Book::get(std::string search) // return all books for a search crtieria { std::list<BSONObj> list = get(search, 1); JsonHelper h; return h.BSONArray2JSONStr(list); }
std::string Book::getAll() // return all books as JSON Array String { std::list<BSONObj> list = pCon->getAll(DB_BOOKS); JsonHelper h; return h.BSONArray2JSONStr(list); }