mirror of
https://github.com/LibreOffice/online.git
synced 2025-08-20 23:24:34 +00:00
wsd: don't warn on missing json
Change-Id: I28086152fbf9fc82ddead1a2feb80f21ffdcd208
This commit is contained in:

committed by
Jan Holesovsky

parent
b7f5809a79
commit
7b48be5a9d
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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)
|
||||
{
|
||||
|
Reference in New Issue
Block a user