json-streaming-parser icon indicating copy to clipboard operation
json-streaming-parser copied to clipboard

Enhancements

Open stechio opened this issue 7 years ago • 3 comments

This branch provides several enhancements to existing interfaces and data handling (as a consequence, compatibility with previous versions is BROKEN):

  • explicit element path tracking (ElementPath class): object keys and array indices are managed in a robust, unified manner and exposed in each and every event (users are relieved the pain to jury-rig their own custom event-filtering mechanism).
  • strongly-typed values (ElementValue class): untypified (string) value event method has been replaced by a strongly-typed one corresponding to actual serialization types.
  • string flattening: adhering to common best practices, cumbersome instances of std::string have been replaced by plain C-style char arrays.

stechio avatar Jan 14 '18 14:01 stechio

Hi. Thank you so much for these enhancements. As you mentioned already, they broke compatibility with previous versions and a bunch of other projects/ libraries including many of my own will break with this upgrade. Since Arduino IDE doesn't know version pinning this will lead to many confused people. I will have to orchestrate accepting and releasing this change carefully with the other projects, I hope you understand. But I am very glad that somebody more fluent in C/C++ than me too the time to improve my code!

squix78 avatar Jan 18 '18 07:01 squix78

Hi Daniel. Of course, I understand such kind of changes can't be easily merged into mature projects without disrupting existing dependencies; nevertheless, I meant to apply them for pulling in case you may be interested to open an evolutionary branch (which wouldn't collide with the existing trunk). BTW, I decided to adopt your porting because of its great model (I had just bumped against memory limits over a tons of DOM libs out there) and its clean coding, which allowed me to effortlessly put some candies upon it. So: thank you for your project!

stechio avatar Jan 18 '18 08:01 stechio

Good enhancements. I have implemented these in a new fork @ https://github.com/mrfaptastic/json-streaming-parser2

mrcodetastic avatar Jul 03 '20 00:07 mrcodetastic