Mercurial > hg > orthanc
comparison OrthancServer/Plugins/Samples/Common/OrthancPluginCppWrapper.cpp @ 4397:3aeb5171fbd4
new function Toolbox::ReadJsonWithoutComments()
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Tue, 22 Dec 2020 08:59:23 +0100 |
parents | d07a65100a95 |
children | d9473bd5ed43 |
comparison
equal
deleted
inserted
replaced
4396:d07a65100a95 | 4397:3aeb5171fbd4 |
---|---|
314 | 314 |
315 | 315 |
316 bool ReadJson(Json::Value& target, | 316 bool ReadJson(Json::Value& target, |
317 const std::string& source) | 317 const std::string& source) |
318 { | 318 { |
319 #if JSONCPP_USE_DEPRECATED == 1 | 319 return ReadJson(target, source.empty() ? NULL : source.c_str(), source.size()); |
320 Json::Reader reader; | |
321 return reader.parse(source, target); | |
322 #else | |
323 return ReadJson(target, source.c_str(), source.size()); | |
324 #endif | |
325 } | 320 } |
326 | 321 |
327 | 322 |
328 bool ReadJson(Json::Value& target, | 323 bool ReadJson(Json::Value& target, |
329 const void* buffer, | 324 const void* buffer, |