diff OrthancFramework/Sources/Toolbox.h @ 4392:3af1d763763a

confining Json::Reader and Json::*Writer into Toolbox
author Sebastien Jodogne <s.jodogne@gmail.com>
date Mon, 21 Dec 2020 18:09:47 +0100
parents fbc49a65340a
children f7104e9d044c
line wrap: on
line diff
--- a/OrthancFramework/Sources/Toolbox.h	Mon Dec 21 08:47:29 2020 +0100
+++ b/OrthancFramework/Sources/Toolbox.h	Mon Dec 21 18:09:47 2020 +0100
@@ -28,7 +28,7 @@
 #include <stdint.h>
 #include <vector>
 #include <string>
-#include <json/json.h>
+#include <json/value.h>
 
 
 #if !defined(ORTHANC_ENABLE_BASE64)
@@ -260,6 +260,17 @@
     static void SimplifyDicomAsJson(Json::Value& target,
                                     const Json::Value& source,
                                     DicomToJsonFormat format);
+
+    static bool ReadJson(Json::Value& target,
+                         const std::string& source);
+
+    static bool ReadJson(Json::Value& target,
+                         const void* buffer,
+                         size_t size);
+
+    static void WriteJson(std::string& target,
+                          const Json::Value& source,
+                          bool fast);
   };
 }