-
Notifications
You must be signed in to change notification settings - Fork 4
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
breaks in 0.10.0 #4
Comments
also now that I think about it, it might just be newer browserify that breaks it, not 0.10.0 maybe now that Buffer gets polyfilled by browserify this codepath is different? https://github.com/dominictarr/JSONStream/blob/master/index.js#L19-L25 |
Weird, cannot reproduce this from this gist, fresh install, using node v0.10.0 and duplex-emitter 0.1.8. Anyway, can you try the latest master of duplex-emitter I just pushed to see if this somehow fixes it? (I'm in the middle of some changes to the tests, but I thought I'd push this for you to try out if you can). Pedro On Sunday, March 31, 2013 at 6:59 AM, Max Ogden wrote:
|
hmm, perhaps you need to upgrade to the newest browserify? I forked the gist and added more stuff to make it easier to reproduce, give this a shot (see readme): https://gist.github.com/maxogden/5282421 also I tried with master duplex-emitter and got an error since |
hmm ok I got it to work by changing this line: https://github.com/dominictarr/JSONStream/blob/master/index.js#L19 from
to
so... I guess buffer-browserify doesn't work with jsonparse and so a quick fix is to just keep using typed arrays for the streaming JSON parsing (since they work fine) instead of trying to implement i'll send a pull req to JSONStream and see what @dominictarr thinks |
@maxogden Remember this? dominictarr/JSONStream#23 |
@pgte FYI using the new JSONStream (0.6.4) fixes this issue |
Landed in duplex-emitter v0.1.9. |
see https://gist.github.com/timoxley/5226701 for a test case
this could actually be a bug in one of these modules, i'm not sure:
https://github.com/toots/buffer-browserify
https://github.com/substack/node-browserify
https://github.com/creationix/jsonparse
https://github.com/dominictarr/JSONStream
basically you get
Uncaught Error: Unexpected "\u0000" at position 0 in state START
as soon as data starts arriving in the client side duplex-emitter instancecc @dominictarr @timoxley
The text was updated successfully, but these errors were encountered: