comparison Applications/StoneWebViewer/Plugin/Plugin.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 c6139e08132b
children 9ac2a65d4172
comparison
equal deleted inserted replaced
1736:77038e2bd074 1737:ef2f56c0311c
169 { 169 {
170 std::string s; 170 std::string s;
171 Orthanc::EmbeddedResources::GetDirectoryResource( 171 Orthanc::EmbeddedResources::GetDirectoryResource(
172 s, Orthanc::EmbeddedResources::WEB_APPLICATION, "/configuration.json"); 172 s, Orthanc::EmbeddedResources::WEB_APPLICATION, "/configuration.json");
173 173
174 Json::Reader reader;
175 Json::Value full; 174 Json::Value full;
176 if (!reader.parse(s, full) || 175 if (!Orthanc::Toolbox::ReadJson(full, s) ||
177 full.type() != Json::objectValue || 176 full.type() != Json::objectValue ||
178 !full.isMember(CONFIG_SECTION) || 177 !full.isMember(CONFIG_SECTION) ||
179 full[CONFIG_SECTION].type() != Json::objectValue) 178 full[CONFIG_SECTION].type() != Json::objectValue)
180 { 179 {
181 throw Orthanc::OrthancException(Orthanc::ErrorCode_BadFileFormat, 180 throw Orthanc::OrthancException(Orthanc::ErrorCode_BadFileFormat,