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)
I would like to add one more thing that would work for people who are reading from a file.
with open('/Users/mohammed/Desktop/working_create_order.json')as jsonfile: data = json.dumps(jsonfile.read())
Then follow the above accepted answer i.e.
data_json = json.loads(data)