diff OrthancServer/Plugins/Engine/OrthancPlugins.cpp @ 4394:f7104e9d044c

functions to read/write JSON in OrthancPluginCppWrapper.h
author Sebastien Jodogne <s.jodogne@gmail.com>
date Tue, 22 Dec 2020 08:11:37 +0100
parents 3af1d763763a
children d9473bd5ed43
line wrap: on
line diff
--- a/OrthancServer/Plugins/Engine/OrthancPlugins.cpp	Mon Dec 21 18:55:32 2020 +0100
+++ b/OrthancServer/Plugins/Engine/OrthancPlugins.cpp	Tue Dec 22 08:11:37 2020 +0100
@@ -2674,13 +2674,13 @@
 
         if (service == _OrthancPluginService_GetInstanceJson)
         {
-          Toolbox::WriteJson(s, instance.GetJson(), false /* styled writer */);
+          Toolbox::WriteStyledJson(s, instance.GetJson());
         }
         else
         {
           Json::Value simplified;
           Toolbox::SimplifyDicomAsJson(simplified, instance.GetJson(), DicomToJsonFormat_Human);
-          Toolbox::WriteJson(s, simplified, false /* styled writer */);
+          Toolbox::WriteStyledJson(s, simplified);
         }
 
         *p.resultStringToFree = CopyString(s);
@@ -2882,7 +2882,7 @@
           static_cast<DicomToJsonFlags>(p.flags), p.maxStringLength);
 
         std::string s;
-        Toolbox::WriteJson(s, json, true /* fast */);
+        Toolbox::WriteFastJson(s, json);
         *p.targetStringToFree = CopyString(s);        
         return;
       }
@@ -3380,7 +3380,7 @@
                          static_cast<DicomToJsonFlags>(p.flags), p.maxStringLength);
 
     std::string s;
-    Toolbox::WriteJson(s, json, true /* fast */);
+    Toolbox::WriteFastJson(s, json);
     *p.result = CopyString(s);
   }