changeset 6255:122f7b1ddaa6

removed function not generic enough: Toolbox::MergeJson()
author Sebastien Jodogne <s.jodogne@gmail.com>
date Fri, 08 Aug 2025 17:16:33 +0200
parents 035555a82e14
children 0db9a58ffe85
files OrthancFramework/Sources/Toolbox.cpp OrthancFramework/Sources/Toolbox.h
diffstat 2 files changed, 0 insertions(+), 27 deletions(-) [+]
line wrap: on
line diff
--- a/OrthancFramework/Sources/Toolbox.cpp	Thu Jul 24 18:59:12 2025 +0200
+++ b/OrthancFramework/Sources/Toolbox.cpp	Fri Aug 08 17:16:33 2025 +0200
@@ -2700,31 +2700,6 @@
 #endif
   }
 
-  void Toolbox::MergeJson(Json::Value &a, const Json::Value &b)
-  {
-    if (!a.isObject() || !b.isObject())
-    {
-      return;
-    }
-
-    Json::Value::Members members = b.getMemberNames();
-
-    for (size_t i = 0; i < members.size(); i++)
-    {
-      std::string key = members[i];
-      
-      if (!a[key].isNull() && a[key].type() == Json::objectValue && b[key].type() == Json::objectValue)
-      {
-        MergeJson(a[key], b[key]);
-      } 
-      else
-      {
-        a[key] = b[key];
-      }
-    }
-  }
-
-
   void Toolbox::RemoveSurroundingQuotes(std::string& value)
   {
     if (!value.empty() &&
--- a/OrthancFramework/Sources/Toolbox.h	Thu Jul 24 18:59:12 2025 +0200
+++ b/OrthancFramework/Sources/Toolbox.h	Fri Aug 08 17:16:33 2025 +0200
@@ -403,8 +403,6 @@
     static void WriteStyledJson(std::string& target,
                                 const Json::Value& source);
 
-    static void MergeJson(Json::Value &a, const Json::Value &b);
-
     static void RemoveSurroundingQuotes(std::string& value);
 
     class ORTHANC_PUBLIC ElapsedTimer : public boost::noncopyable