squix78 / json-streaming-parser

Arduino library for parsing potentially huge json streams on devices with scarce memory
MIT License
205 stars 88 forks source link

No use of streams #24

Closed matth512 closed 4 years ago

matth512 commented 5 years ago

I was looking for a streaming parser for use in a Particle project and came across this one. Why do you call it a streaming parser when you do not leverage any type of stream? The real point of a streaming parser is that it can parse any size document as it only works on a part of it at a time in memory. You converted the streaming parser to now require the whole document in memory. If you wont fix this you should at least take "streaming" out of the project name and documentation.

squix78 commented 4 years ago

Why do you think this parser requires the document to be in memory? Just because it doesn't use the Stream class it doesn't mean you can't use it with it. Just look at the public API in JsonStreamingParser.h: void parse(char c); void setListener(JsonListener* listener); void reset(); This means you can feed in char by char into the parser, this is exactly what streaming means. Maybe you can explain to me where the documentation mislead you?