Cool. Hey what should i do when i want to process a 1 GB+ json from the internet without using 1gb of ram? Its structure is similar as in your examples and I just need to iterate over the objects. I would need to stream the http somehow but idk how.
You could pass the data chunk by chunk I suppose. It's not something that the library does natively. It's also not designed to solve the "scaling problem". Do you need all the items in the json file? If the file is a jsonlines file then you might be able to effectively filter the data first.
1
u/tahafyto Mar 30 '21
Cool. Hey what should i do when i want to process a 1 GB+ json from the internet without using 1gb of ram? Its structure is similar as in your examples and I just need to iterate over the objects. I would need to stream the http somehow but idk how.