Mercurial > hg > orthanc-stone
comparison OrthancStone/Sources/Loaders/DicomSource.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 | c8d0ffb3047d |
children | 9ac2a65d4172 |
comparison
equal
deleted
inserted
replaced
1736:77038e2bd074 | 1737:ef2f56c0311c |
---|---|
24 | 24 |
25 #include "../Oracle/HttpCommand.h" | 25 #include "../Oracle/HttpCommand.h" |
26 #include "../Oracle/OrthancRestApiCommand.h" | 26 #include "../Oracle/OrthancRestApiCommand.h" |
27 | 27 |
28 #include <OrthancException.h> | 28 #include <OrthancException.h> |
29 #include <Toolbox.h> | |
29 | 30 |
30 #include <boost/algorithm/string/predicate.hpp> | 31 #include <boost/algorithm/string/predicate.hpp> |
31 | 32 |
32 namespace OrthancStone | 33 namespace OrthancStone |
33 { | 34 { |
266 { | 267 { |
267 throw Orthanc::OrthancException(Orthanc::ErrorCode_BadSequenceOfCalls); | 268 throw Orthanc::OrthancException(Orthanc::ErrorCode_BadSequenceOfCalls); |
268 } | 269 } |
269 | 270 |
270 Json::Value a, b; | 271 Json::Value a, b; |
271 Json::Reader reader; | 272 if (Orthanc::Toolbox::ReadJson(a, system) && |
272 if (reader.parse(system, a) && | 273 Orthanc::Toolbox::ReadJson(b, plugins) && |
273 reader.parse(plugins, b) && | |
274 a.type() == Json::objectValue && | 274 a.type() == Json::objectValue && |
275 b.type() == Json::arrayValue && | 275 b.type() == Json::arrayValue && |
276 a.isMember(REST_API_VERSION) && | 276 a.isMember(REST_API_VERSION) && |
277 a[REST_API_VERSION].type() == Json::intValue) | 277 a[REST_API_VERSION].type() == Json::intValue) |
278 { | 278 { |