by treyd · 3y ago · 0 comments
https://github.com/adamritter/fastgron/blob/main/src/print_g...
And gron -u in theory should use less memory than gron-ifying a JSON, as you just have to fill a data structure in memory as you go.
You don't know the size, shape, or type of any of the levels in the data structure until you get to a line specifying one part of it. If you did, yep, it would be trivial!
If users[14] is a string, or there are 1500 users, the amount of memory usage to ungrok that line is exactly the same. Prove me wrong, I can't think of any way it would not be trivial, provided one uses the correct datastructures.