diff --git a/transit/experimental/transit_data.cpp b/transit/experimental/transit_data.cpp index d6324459c0..880fe37e03 100644 --- a/transit/experimental/transit_data.cpp +++ b/transit/experimental/transit_data.cpp @@ -163,7 +163,10 @@ std::vector GetPointsFromJson(json_t * obj) TimeTable GetTimeTableFromJson(json_t * obj) { - json_t * arr = base::GetJSONObligatoryField(obj, "timetable"); + json_t * arr = base::GetJSONOptionalField(obj, "timetable"); + if (!arr) + return TimeTable{}; + CHECK(json_is_array(arr), ()); TimeTable timetable;