Typehints / quicktype alternative for json in python

285 views Asked by At

Right now creating code with: quicktype -l python

So I can parse my response to code:

data = requests.get(url).json()
data_with_types = top_level_from_dict(data)
print(data_with_types.data.this.works.fine)

This has been very helpful with big and messy json responses.

My problems are:

  • Code breaks when something changes in data.
  • It gets a bit slow with big data.

Is there an alternative solution or a better way to maybe fix this?

0

There are 0 answers