wsd: don't warn on missing json

Change-Id: I28086152fbf9fc82ddead1a2feb80f21ffdcd208
This commit is contained in:
Ashod Nakashian
2018-08-01 22:03:53 -04:00
committed by Jan Holesovsky
parent b7f5809a79
commit 7b48be5a9d
2 changed files with 9 additions and 6 deletions

View File

@ -106,7 +106,7 @@ bool findJSONValue(Poco::JSON::Object::Ptr &object, const std::string& key, T& v
// Check each property name against given key
// and warn for mis-spells with tolerance of 2.
for (const std::string& userInput: propertyNames)
for (const std::string& userInput : propertyNames)
{
if (key != userInput)
{
@ -134,7 +134,7 @@ bool findJSONValue(Poco::JSON::Object::Ptr &object, const std::string& key, T& v
return true;
}
LOG_WRN("Missing JSON property [" << key << "]");
LOG_INF("Missing JSON property [" << key << "] will default to [" << value << "].");
return false;
}

View File

@ -369,10 +369,13 @@ Poco::Timestamp iso8601ToTimestamp(const std::string& iso8601Time, const std::st
Poco::Timestamp timestamp = Poco::Timestamp::fromEpochTime(0);
try
{
int timeZoneDifferential;
Poco::DateTime dateTime;
Poco::DateTimeParser::parse(Poco::DateTimeFormat::ISO8601_FRAC_FORMAT, iso8601Time, dateTime, timeZoneDifferential);
timestamp = dateTime.timestamp();
if (!iso8601Time.empty())
{
int timeZoneDifferential;
Poco::DateTime dateTime;
Poco::DateTimeParser::parse(Poco::DateTimeFormat::ISO8601_FRAC_FORMAT, iso8601Time, dateTime, timeZoneDifferential);
timestamp = dateTime.timestamp();
}
}
catch (const Poco::SyntaxException& exc)
{