minipb icon indicating copy to clipboard operation
minipb copied to clipboard

"SAP" streaming parser API?

Open pepijndevos opened this issue 1 year ago • 1 comments

I might implement this if I feel like it but just wanted to drop the idea here. So basically this library is ideal for micropython on low memory devices, but doesn't have a way to parse bigger-than-ram inputs.

It seems like the core API up until _break_down is already an iterator that reads from a file-like object. So it seems like you'd just have to write a IterWire subclass that returns an iterator like (path, value) instead of assembling a dict or tuple. Would be a fun puzzle.

pepijndevos avatar Aug 09 '22 09:08 pepijndevos

Interesting idea. I currently don't have time dedicated to this library but feel free to send a PR if anyone got it working.

dogtopus avatar Aug 09 '22 12:08 dogtopus