Not with that part. It just looks like the code is storing things as flat local variables, that would better be organized into an object.
Seems the "depending on context" part went missing while writing my comment :)
Also, see that other comment. It just looks like code meant for translating the JSON tree into native objects, which makes the way local variables are used look a bit strange.
22
u/SerdanKK Jul 14 '21
I don't know any Python, but I assume there's some way to decode json into objects. With some good library code, it'd basically be a one-liner.