diff 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
line wrap: on
line diff
--- a/Resources/Orthanc/Plugins/OrthancPluginCppWrapper.cpp	Tue Dec 22 08:31:22 2020 +0100
+++ b/Resources/Orthanc/Plugins/OrthancPluginCppWrapper.cpp	Wed Jan 06 17:58:24 2021 +0100
@@ -2,7 +2,7 @@
  * Orthanc - A Lightweight, RESTful DICOM Store
  * Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics
  * Department, University Hospital of Liege, Belgium
- * Copyright (C) 2017-2020 Osimis S.A., Belgium
+ * Copyright (C) 2017-2021 Osimis S.A., Belgium
  *
  * This program is free software: you can redistribute it and/or
  * modify it under the terms of the GNU General Public License as
@@ -316,12 +316,7 @@
   bool ReadJson(Json::Value& target,
                 const std::string& source)
   {
-#if JSONCPP_USE_DEPRECATED == 1
-    Json::Reader reader;
-    return reader.parse(source, target);
-#else
-    return ReadJson(target, source.c_str(), source.size());
-#endif
+    return ReadJson(target, source.empty() ? NULL : source.c_str(), source.size());
   }