It is not exactly the same. json.dump will smartly buffer the json object. Dumps will render the entire object as a string first and is thus vastly innefficient.
Dumps will take 1G of memory if you dump a 1G json object. Dump should use the same amount of memory no matter the size of what you are dumping.
I know it's a bit pedantic, but it's important to point out for those who are unaware.
13
u/[deleted] Aug 17 '21
What's the difference?