diff OrthancFramework/Sources/SerializationToolbox.cpp @ 5255:f783b99e4738 db-protobuf

fix
author Sebastien Jodogne <s.jodogne@gmail.com>
date Tue, 11 Apr 2023 16:28:28 +0200
parents 0ea402b4d901
children b31c73bc7cb6
line wrap: on
line diff
--- a/OrthancFramework/Sources/SerializationToolbox.cpp	Tue Apr 11 11:09:52 2023 +0200
+++ b/OrthancFramework/Sources/SerializationToolbox.cpp	Tue Apr 11 16:28:28 2023 +0200
@@ -72,6 +72,21 @@
   }
 
 
+  std::string SerializationToolbox::ReadString(const Json::Value& value,
+                                               const std::string& field,
+                                               const std::string& defaultValue)
+  {
+    if (value.isMember(field.c_str()))
+    {
+      return ReadString(value, field);
+    }
+    else
+    {
+      return defaultValue;
+    }
+  }
+
+
   int SerializationToolbox::ReadInteger(const Json::Value& value,
                                         const std::string& field)
   {