# HG changeset patch # User Sebastien Jodogne # Date 1611341792 -3600 # Node ID ccca625b529ce5a191b1af73e5bbe069722daa23 # Parent a5e98f4af53d8712384ebfde817e5ff31d7f7c22 compatibility with Orthanc framework 1.8.2 diff -r a5e98f4af53d -r ccca625b529c Plugin/Configuration.cpp --- a/Plugin/Configuration.cpp Fri Jan 22 16:10:36 2021 +0100 +++ b/Plugin/Configuration.cpp Fri Jan 22 19:56:32 2021 +0100 @@ -163,7 +163,7 @@ void ParseJsonBody(Json::Value& target, const OrthancPluginHttpRequest* request) { - if (!Orthanc::Toolbox::ReadJson(target, request->body, request->bodySize)) + if (!OrthancPlugins::ReadJson(target, request->body, request->bodySize)) { throw Orthanc::OrthancException(Orthanc::ErrorCode_BadFileFormat, "A JSON file was expected"); diff -r a5e98f4af53d -r ccca625b529c Plugin/DicomWebFormatter.cpp --- a/Plugin/DicomWebFormatter.cpp Fri Jan 22 16:10:36 2021 +0100 +++ b/Plugin/DicomWebFormatter.cpp Fri Jan 22 19:56:32 2021 +0100 @@ -217,7 +217,7 @@ #if !defined(NDEBUG) // In debug mode, check that the value is actually a JSON string Json::Value json; - if (!Orthanc::Toolbox::ReadJson(json, data, size)) + if (!OrthancPlugins::ReadJson(json, data, size)) { throw Orthanc::OrthancException(Orthanc::ErrorCode_BadFileFormat); } diff -r a5e98f4af53d -r ccca625b529c Plugin/DicomWebServers.cpp --- a/Plugin/DicomWebServers.cpp Fri Jan 22 16:10:36 2021 +0100 +++ b/Plugin/DicomWebServers.cpp Fri Jan 22 19:56:32 2021 +0100 @@ -391,7 +391,7 @@ json[it->first] = server; } - Orthanc::Toolbox::WriteFastJson(target, json); + OrthancPlugins::WriteFastJson(target, json); } @@ -399,7 +399,7 @@ { Json::Value json; - if (!Orthanc::Toolbox::ReadJson(json, source) || + if (!OrthancPlugins::ReadJson(json, source) || json.type() != Json::objectValue) { throw Orthanc::OrthancException(Orthanc::ErrorCode_BadFileFormat, "Cannot unserialize " diff -r a5e98f4af53d -r ccca625b529c Plugin/QidoRs.cpp --- a/Plugin/QidoRs.cpp Fri Jan 22 16:10:36 2021 +0100 +++ b/Plugin/QidoRs.cpp Fri Jan 22 19:56:32 2021 +0100 @@ -492,7 +492,7 @@ LOG(INFO) << "Body of the call from QIDO-RS to /tools/find: " << find.toStyledString(); std::string body; - Orthanc::Toolbox::WriteFastJson(body, find); + OrthancPlugins::WriteFastJson(body, find); Json::Value resources; if (!OrthancPlugins::RestApiPost(resources, "/tools/find", body, false) ||