Looks like there was a change to the API and there’s now not necessarily a value returned for closed on Events anymore. I was getting empty arrays of events until I deleted let closeDate = json["closed"] as? String from the main guard statement, and replaced the self.closeDate assignment as follows:
if let closeDate = json["closed"] as? String {
self.closeDate = EONET.ISODateReader.date(from: closeDate)
} else {
self.closeDate = nil
}
Might not be a bad argument for shifting all the JSON parsing to Codable in the future - at least at that point it’d scream real loud when something like this happens.