-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
parsing object mangles the input buffer and fails to parse, but parse returns true! #342
Comments
it looks like that is behaving exactly as it should... having looked at some examples that do work. |
The mangling part is expected, it's how ArduinoJson works. "It's not a bug, it's a feature" 😛 However, you found a bug in Now, you might be asking why the parse fails... I bet that's because the |
…cess()` nor `JsonObject::success()` (issue #342).
The fix is available in v5.6.6. |
cool thanks. yes i figured looking at successful parses that it is normal. i guess it stopped parsing and as you identified success was returning true. so yes a bug, glad to help. TBH i've no idea why it was failing. it has started working, so may well be buffer related. i thought it might be the + sign, but it wasn't. The issue was that it was returning success! Thanks for the hard work! |
I've written a class that parses a SPIFFS file into a buffer, parses it into an abject and returns it for the program to use. the buffer is a unique_ptr kept until the jsonpackage is out of scope... but for some reason parsing the buffer mangles it, the parse fails, but it returns true!
here it the code
here is the debug output
From the output you can see that the file is read correctly into the buffer... you can see the buffer before and after the parse... where before it is fine but after
globals.obals": {
is problematic... I've not got a clue about why this is happening... can you spot anything from my code?here are the full files...
JsonPackage.h.txt
JsonPackage.cpp.txt
The text was updated successfully, but these errors were encountered: