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

Bug Fix for endDocument() event #4

Open CubanJew opened 8 years ago

CubanJew commented 8 years ago

The endDocument()event never gets activated (even when using the included sample implementation code) due to a small bug in JsonStreamingParser.cpp

Inside function JsonStreamingParser::endObject(), change line 277 from

if (stackPos == -1) { to if (stackPos == 0) {