Replace rapidjson and restclient calls with mongodb c++ driver calls.