The Train status API I use recently added two additional key value pairs (has_arrived, has_departed) in the JSON object, which caused my script to crash.
(has_arrived, has_departed)
{ "value": False } or { "key": false } is not a valid json https://jsonlint.com/