comparison OrthancFramework/Sources/SerializationToolbox.cpp @ 4451:f4dbdb2dcba6

new configuration option "MaximumPduLength" to tune the maximum PDU length
author Sebastien Jodogne <s.jodogne@gmail.com>
date Mon, 18 Jan 2021 14:51:52 +0100
parents d9473bd5ed43
children add0337b928a
comparison
equal deleted inserted replaced
4450:9bf2f9e0af47 4451:f4dbdb2dcba6
115 return static_cast<unsigned int>(tmp); 115 return static_cast<unsigned int>(tmp);
116 } 116 }
117 } 117 }
118 118
119 119
120 unsigned int SerializationToolbox::ReadUnsignedInteger(const Json::Value& value,
121 const std::string& field,
122 unsigned int defaultValue)
123 {
124 if (value.isMember(field.c_str()))
125 {
126 return ReadUnsignedInteger(value, field);
127 }
128 else
129 {
130 return defaultValue;
131 }
132 }
133
134
120 bool SerializationToolbox::ReadBoolean(const Json::Value& value, 135 bool SerializationToolbox::ReadBoolean(const Json::Value& value,
121 const std::string& field) 136 const std::string& field)
122 { 137 {
123 if (value.type() != Json::objectValue || 138 if (value.type() != Json::objectValue ||
124 !value.isMember(field.c_str()) || 139 !value.isMember(field.c_str()) ||