A lot of this code is built based on the idea that the JSON returned from the API should be the same. But sometimes it isn't or the API might change.
So we need better handling of what happens when an expected spot in a JSON file is not there.
I'm thinking of a function like try_json() that will attempt to grab a json slot but if it isn't there will send back a detailed error report about what isn't there.
A lot of this code is built based on the idea that the JSON returned from the API should be the same. But sometimes it isn't or the API might change.
So we need better handling of what happens when an expected spot in a JSON file is not there.
I'm thinking of a function like
try_json()
that will attempt to grab a json slot but if it isn't there will send back a detailed error report about what isn't there.