-
Notifications
You must be signed in to change notification settings - Fork 638
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
Update to ArduinoJson 6 #1589
Comments
Migration docs are available @ https://arduinojson.org/v6/doc/upgrade/ |
Important note from the migration guide:
All dynamic memory buffers now need hard-coded max capacity value. Old DynamicJsonBuffer also had a fixed-size constructor option, but I think that was used here exactly once and since was removed from the code. Only 10 files use it: |
Half-broken, but buildable: What I am not liking is size increase, almost +4KB. Either what we are doing is really wrong, or this flow is not optimized in the new version. Via
+442 bytes just there edit: |
I don't know too much about the ArduinoJson code, but wouldn't it make sense to use |
IDK. Static one is a template, so we actually create a new class definition every time we use a different document size. Plus, it uses stack, and it might be problematic if there are some other heavy structs used. by default, esp8266 stack is 4k deep. if WPS is enabled, it is 8k (but -4k less heap, because of the Core tweaks). |
There is also useful Size still grows. Current |
Oh, I missed this release's changelog. While noticing the writer issue, its turns out there are readers too!
Some weird dynamic things like ws incoming buffer could use non-linear memory a-la telnet outgoing buffer without using Stream |
ref #924, #1179
Since 6.9.0 ArduinoJson is no longer in beta.
https://github.com/bblanchon/ArduinoJson/releases/tag/v6.9.0
The text was updated successfully, but these errors were encountered: