How to make Swift Codable types more versatile
问题 I currently am working with an API that deals with bus predictions. There is an interesting quirk with the JSON that is returned for the predictions of a certain stop. When there are multiple predictions for a stop, the JSON looks something like this: ... "direction": { "prediction": [ { "affectedByLayover": "true", "block": "241", "dirTag": "loop", "epochTime": "1571785998536", "isDeparture": "false", "minutes": "20", "seconds": "1208", "tripTag": "121", "vehicle": "1698" }, {