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

Add function to parse JSON directly from InputStream #7107

Closed
sethladd opened this issue Dec 3, 2012 · 3 comments
Closed

Add function to parse JSON directly from InputStream #7107

sethladd opened this issue Dec 3, 2012 · 3 comments
Labels
area-core-library SDK core library issues (core, async, ...); use area-vm or area-web for platform specific libraries. P2 A bug or feature request we're likely to work on type-enhancement A request for a change that isn't a bug

Comments

@sethladd
Copy link
Contributor

sethladd commented Dec 3, 2012

Use case: getting an input stream from an HTTP request and turning that into JSON. Currently, we have to manually read in the input stream into a string buffer and then parse that in with JSON.parse. Would be really nice to simply give the input stream to JSON.

@lrhn
Copy link
Member

lrhn commented Dec 6, 2012

Will it still need to complete the entire stream before providing the result, or would you want a SAX-like parser for JSON?

@sethladd
Copy link
Contributor Author

sethladd commented Dec 6, 2012

I think reading in the entire stream would be a good first step.

@sethladd sethladd added Type-Enhancement area-core-library SDK core library issues (core, async, ...); use area-vm or area-web for platform specific libraries. labels Dec 6, 2012
@kevmoo kevmoo added P2 A bug or feature request we're likely to work on type-enhancement A request for a change that isn't a bug and removed triaged labels Feb 29, 2016
@lrhn
Copy link
Member

lrhn commented Aug 11, 2017

There is now JSON.fuse(UTF8) which can be used as a stream-transformer on the input stream.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-core-library SDK core library issues (core, async, ...); use area-vm or area-web for platform specific libraries. P2 A bug or feature request we're likely to work on type-enhancement A request for a change that isn't a bug
Projects
None yet
Development

No branches or pull requests

3 participants