comparison OrthancStone/Sources/Loaders/SeriesThumbnailsLoader.cpp @ 1738:05dc12df49db

remove calls to deprecated classes of JsonCpp
author Sebastien Jodogne <s.jodogne@gmail.com>
date Tue, 22 Dec 2020 09:18:33 +0100
parents ef2f56c0311c
children 9ac2a65d4172
comparison
equal deleted inserted replaced
1737:ef2f56c0311c 1738:05dc12df49db
431 431
432 virtual void HandleSuccess(const std::string& body, 432 virtual void HandleSuccess(const std::string& body,
433 const std::map<std::string, std::string>& headers) ORTHANC_OVERRIDE 433 const std::map<std::string, std::string>& headers) ORTHANC_OVERRIDE
434 { 434 {
435 Json::Value json; 435 Json::Value json;
436 Json::Reader reader; 436 if (!Orthanc::Toolbox::ReadJson(json, body) ||
437 if (!reader.parse(body, json) ||
438 json.type() != Json::arrayValue) 437 json.type() != Json::arrayValue)
439 { 438 {
440 throw Orthanc::OrthancException(Orthanc::ErrorCode_NetworkProtocol); 439 throw Orthanc::OrthancException(Orthanc::ErrorCode_NetworkProtocol);
441 } 440 }
442 441