daggaz / json-stream

Simple streaming JSON parser and encoder.
MIT License
122 stars 18 forks source link

Raise error on unterminated string at EOF #36

Closed smheidrich closed 1 year ago

smheidrich commented 1 year ago

Resolves part (or all?) of the issue mentioned in #35, but only for the Python tokenizer, of course.

Corresponding PR for the Rust tokenizer: https://github.com/smheidrich/py-json-stream-rs-tokenizer/pull/55

Also adds new test case for this.

daggaz commented 1 year ago

Hey, I'll pick up from here and cover the other two cases, unterminated list and unterminated object.

daggaz commented 1 year ago

@smheidrich thoughts?

smheidrich commented 1 year ago

@daggaz Looks good to me :+1: I've merged https://github.com/smheidrich/py-json-stream-rs-tokenizer/pull/55, so if you depend on version 0.4.16+ of the Rust tokenizer (should be released ~20 minutes from now), the issue will be resolved there as well.