Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't lazily parse large JSON objects #62

Open
conan opened this issue Jun 18, 2014 · 2 comments
Open

Can't lazily parse large JSON objects #62

conan opened this issue Jun 18, 2014 · 2 comments

Comments

@conan
Copy link

conan commented Jun 18, 2014

Cheshire has support for lazily parsing JSON files containing large numbers of objects, but not for parsing large objects themselves.

For example:

{"stars" : [
    {"name" : "Betelgeuse", "magnitude" : 0.58},
    {"name" : "Rigel", "magnitude" : 0.12},
    ... 300 billion others ...
    {"name" : "Antares", "magnitude" : 0.92}]}

Trying to use Cheshire to lazily get the stars in the Milky Way one by one from this JSON doesn't work - if I try to parse the "stars" object using core/parsed-seq, it calls directly into parse/parse*, which bypasses the lazy array functionality in parse/parse, and attempts to evaluate the entire galaxy. Even using parse/parse directly doesn't seem to work (but I'm not sure why).

@carylee
Copy link

carylee commented Jan 14, 2015

I'd love to be able to do this as well. https://github.com/dominictarr/JSONStream does this really nicely.

@jgalrito
Copy link

Any chance of this happening?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants