Skip to content
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

Upgrade ArduinoJson to ^6 #2142

Open
JavanPoirier opened this issue Dec 31, 2024 · 1 comment
Open

Upgrade ArduinoJson to ^6 #2142

JavanPoirier opened this issue Dec 31, 2024 · 1 comment

Comments

@JavanPoirier
Copy link

There is a bug in the current version with serialization/de-serialization causing malformed nested objects. I have updated without any noticeable issues.

@peshovec
Copy link
Contributor

In my personal setup (rf,rf2,pilight and rtl_433) i use ArduinoJson 7.3.0

Had to do some tweak, elsewhere the discovery (rtl_433) messages were not ok
peshovec@b6847f6

This modification was not needed with ArduinoJson 7.2.1

Share that, as it seems ArduinoJson 7 implement some nice goodies - for example ability to safely read json key, even if the key does not exist (returns null in this case). It is claimed that this can lead to smaller code (when refactored).
However containsKey is deprecated in favor of checking the type of the key value (general check, regardless of the type exist too)

Probably it is worth to have in mind if update to latest ArduinoJson is in the plans. Did not dig very deep, based on my observation, potential roadmap could be:

  • "one" time effort to go to 7.2.1
  • refactor the deprecations (containsKey) when a change in the code is needed , e.g. on demand
  • follow the 7.3 and latest.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants