You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I used the parsing sample code from the page 80 of manual and wonderfully saw library said JSON is invalid, but I still had the deserialized objects and array size was working too (albeit 1 more than total objects). After some tests I figured out the problem was additional comma character at the end of objects.
Since it's not really a problem, please change the validator not to have problem at this situation.
The text was updated successfully, but these errors were encountered:
The JSON format doesn't allow trailing commas in arrays and objects, and ArduinoJson stops reading as soon at it finds one.
In your case, the JsonDocument is complete because the error occured at the end of the document, but if you had anything after the array, it would be lost.
I plan on adding support for JSON5, which supports trailing commas (#1687).
Hi,
Thank you for your valuable library.
I was using ArduinoJson to parse an object array similar to this:
I used the parsing sample code from the page 80 of manual and wonderfully saw library said JSON is invalid, but I still had the deserialized objects and array size was working too (albeit 1 more than total objects). After some tests I figured out the problem was additional comma character at the end of objects.
Since it's not really a problem, please change the validator not to have problem at this situation.
The text was updated successfully, but these errors were encountered: