Skip to content
Snippets Groups Projects
Commit af6fff9f authored by Matthew D Jones's avatar Matthew D Jones
Browse files

Re #13729 Remove depend CatalogAlgorithmHelper on boost::property_tree

parent 694c590d
No related branches found
No related tags found
No related merge requests found
#include "MantidICat/CatalogAlgorithmHelper.h"
#include <boost/property_tree/ptree.hpp>
#include <boost/property_tree/json_parser.hpp>
#include <boost/assign/list_of.hpp>
#include <json/reader.h>
namespace Mantid {
namespace ICat {
......@@ -26,9 +25,9 @@ const std::string CatalogAlgorithmHelper::getIDSError(
// from the server is not in our successHTTPStatus set.
if (successHTTPStatus.find(HTTPStatus) == successHTTPStatus.end()) {
// Stores the contents of `jsonResponseData` as a json property tree.
boost::property_tree::ptree json;
Json::Value json;
// Convert the stream to a JSON tree.
boost::property_tree::read_json(responseStream, json);
Json::Reader::parse(responseStream, json);
// Return the message returned by the server.
return json.get<std::string>("code") + ": " +
json.get<std::string>("message");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment