comparison Resources/Orthanc/Plugins/OrthancPluginCppWrapper.cpp @ 32:3bd0ec7c5a7c

upgrade to year 2021
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 06 Jan 2021 17:58:24 +0100
parents cfeda58d0c8e
children 81262707d68e
comparison
equal deleted inserted replaced
31:cfeda58d0c8e 32:3bd0ec7c5a7c
1 /** 1 /**
2 * Orthanc - A Lightweight, RESTful DICOM Store 2 * Orthanc - A Lightweight, RESTful DICOM Store
3 * Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics 3 * Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics
4 * Department, University Hospital of Liege, Belgium 4 * Department, University Hospital of Liege, Belgium
5 * Copyright (C) 2017-2020 Osimis S.A., Belgium 5 * Copyright (C) 2017-2021 Osimis S.A., Belgium
6 * 6 *
7 * This program is free software: you can redistribute it and/or 7 * This program is free software: you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License as 8 * modify it under the terms of the GNU General Public License as
9 * published by the Free Software Foundation, either version 3 of the 9 * published by the Free Software Foundation, either version 3 of the
10 * License, or (at your option) any later version. 10 * License, or (at your option) any later version.
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,