json parser in python - stream-based?

Tomeu Vizoso tomeu at sugarlabs.org
Wed May 20 06:33:12 EDT 2009

On Wed, May 20, 2009 at 12:15, Martin Langhoff
<martin.langhoff at gmail.com> wrote:
> Hi all,
> I'm looking for a json parser that is stream (+callbacks) oriented so
> I can read through a larger-than-memory json file and only actuall
> read into memory the parts of it I'm interested in. Big plus if it's
> pure python or based on hooks to the existing json parser.
> Good hints appreciated :-)
> Background - cjson-formatted lease files can get truly huge, and we
> just fail to handle that. This is a problem for large deployments,
> where the repair centers want 'magic revival usb sticks' that have
> (short-lived) leases for all the (non-stolen) machines that the
> deployment has.
> Whatever new code can handle that, it needs to run in the initrd, so
> additional compiled dependencies are a big hurdle...

Cannot directly answer your questions, but my guess is that json is
expected to be used in small files. Any chance to split that big file
in several smaller ones?



More information about the Devel mailing list