Remove now unnecessary workaround.
This commit is contained in:
parent
43a29bfdba
commit
b0c6be2366
15
src/json.cpp
15
src/json.cpp
|
@ -64,20 +64,7 @@ entry_type from_json(const string_view json_string)
|
||||||
#endif
|
#endif
|
||||||
{}
|
{}
|
||||||
entry.tags = json[0].at("tags").get<vector<string>>();
|
entry.tags = json[0].at("tags").get<vector<string>>();
|
||||||
try
|
entry.report_time = json[0].at("report_time").get<string>();
|
||||||
{
|
|
||||||
entry.report_time = json[0].at("report_time").get<string>();
|
|
||||||
}
|
|
||||||
// TODO: this is only necessary for compatibility with old test data. Remove
|
|
||||||
// before going live.
|
|
||||||
#if NLOHMANN_JSON_VERSION_MAJOR >= 3
|
|
||||||
catch (const nlohmann::detail::out_of_range &)
|
|
||||||
#else
|
|
||||||
catch (const std::out_of_range &)
|
|
||||||
#endif
|
|
||||||
{
|
|
||||||
entry.report_time = "1970-01-01T00:00:00";
|
|
||||||
}
|
|
||||||
|
|
||||||
return entry;
|
return entry;
|
||||||
}
|
}
|
||||||
|
|
Reference in New Issue