# HG changeset patch # User Sebastien Jodogne # Date 1681223308 -7200 # Node ID f783b99e4738e874f9401794ad61595ddf2edc2d # Parent fafdb6179829c36bdbe4f664dab7b9dd9eabf339 fix diff -r fafdb6179829 -r f783b99e4738 OrthancFramework/Sources/SerializationToolbox.cpp --- 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) { diff -r fafdb6179829 -r f783b99e4738 OrthancFramework/Sources/SerializationToolbox.h --- a/OrthancFramework/Sources/SerializationToolbox.h Tue Apr 11 11:09:52 2023 +0200 +++ b/OrthancFramework/Sources/SerializationToolbox.h Tue Apr 11 16:28:28 2023 +0200 @@ -38,6 +38,10 @@ static std::string ReadString(const Json::Value& value, const std::string& field); + static std::string ReadString(const Json::Value& value, + const std::string& field, + const std::string& defaultValue); + static int ReadInteger(const Json::Value& value, const std::string& field); diff -r fafdb6179829 -r f783b99e4738 OrthancServer/Resources/Configuration.json --- a/OrthancServer/Resources/Configuration.json Tue Apr 11 11:09:52 2023 +0200 +++ b/OrthancServer/Resources/Configuration.json Tue Apr 11 16:28:28 2023 +0200 @@ -433,8 +433,8 @@ // "AllowStore" : true, // "AllowStorageCommitment" : false, // new in 1.6.0 // "AllowTranscoding" : true, // new in 1.7.0 - // "UseDicomTls" : false // new in 1.9.0 - // "LocalAet" : "HELLO" // new in 1.9.0 + // "UseDicomTls" : false, // new in 1.9.0 + // "LocalAet" : "HELLO", // new in 1.9.0 // "Timeout" : 60 // new in 1.9.1 //} },