Mercurial > hg > orthanc-stone
comparison OrthancStone/Sources/Loaders/DicomResourcesLoader.cpp @ 1737:ef2f56c0311c
remove calls to deprecated classes of JsonCpp
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Tue, 22 Dec 2020 09:16:42 +0100 |
parents | 52b8b96cb55f |
children | 9ac2a65d4172 |
comparison
equal
deleted
inserted
replaced
1736:77038e2bd074 | 1737:ef2f56c0311c |
---|---|
30 # include "../Oracle/ParseDicomFromFileCommand.h" | 30 # include "../Oracle/ParseDicomFromFileCommand.h" |
31 # include <DicomParsing/ParsedDicomDir.h> | 31 # include <DicomParsing/ParsedDicomDir.h> |
32 # include <DicomParsing/ParsedDicomFile.h> | 32 # include <DicomParsing/ParsedDicomFile.h> |
33 #endif | 33 #endif |
34 | 34 |
35 #include <Toolbox.h> | |
36 | |
35 #include <boost/filesystem/path.hpp> | 37 #include <boost/filesystem/path.hpp> |
36 | 38 |
37 namespace OrthancStone | 39 namespace OrthancStone |
38 { | 40 { |
39 static std::string GetUri(Orthanc::ResourceType level) | 41 static std::string GetUri(Orthanc::ResourceType level) |
139 | 141 |
140 virtual void HandleJson(const Json::Value& body) = 0; | 142 virtual void HandleJson(const Json::Value& body) = 0; |
141 | 143 |
142 virtual void HandleString(const std::string& body) | 144 virtual void HandleString(const std::string& body) |
143 { | 145 { |
144 Json::Reader reader; | |
145 Json::Value value; | 146 Json::Value value; |
146 if (reader.parse(body, value)) | 147 if (Orthanc::Toolbox::ReadJson(value, body)) |
147 { | 148 { |
148 HandleJson(value); | 149 HandleJson(value); |
149 } | 150 } |
150 else | 151 else |
151 { | 152 { |