juanjoDiaz / streamparser-json

Streaming JSON parser in Javascript for Node.js and the browser
MIT License
138 stars 11 forks source link

Emit partial #37

Closed juanjoDiaz closed 11 months ago

juanjoDiaz commented 1 year ago

Supersedes #36. Also solves the issue raised in #31.

@lunaris this is heavily influenced by your PR. Sorry it took me so long 😅 Wdyt? Does this cover your use case?

@chrisciszak this is a proper solution to you request so you don't have to rely on the library internals. Wdyt?

If the feedback is good, I'll merge and release this.

lunaris commented 12 months ago

Thanks for following up. I've given it a look through and I think it seems about the same, though I appreciate some of it has been changed to accommodate the existing design.

juanjoDiaz commented 11 months ago

Thanks for the review guys!

@lunaris it is indeed roughly the same. Except that, instead of having separate tokenizer, token-parser & json-parser, I just made the normal ones configurable. And extend the Node and WHATWG interfaces to also support this.

If there are not more comments, I'll merge and cut a release soon :)