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

Migrating from Version 5 to 6 I get InvalidInput on deserializeJson #1686

Closed
juancgalvez opened this issue Dec 16, 2021 · 3 comments
Closed
Labels
question v6 ArduinoJson 6

Comments

@juancgalvez
Copy link

juancgalvez commented Dec 16, 2021

I used to transmit via MQTT codes to me IR Remote micro controller and parse them with ArduinoJson without any issues. After upgrading to version 6 I have problems while parsing the JSON message.

This message used to work;

{"protocol":"SAMSUNG","data": 0xE0E0E01F}

That message used to work with version 5. But, with version 6 I get InvalidInput error on deserializeJson. I have to enclose the hex value inside quotes to make it work. Something like this:

{"protocol":"SAMSUNG","data": "0xE0E0E01F"}

In JSON format, numeric values don't necessarily must be enclosed inside quotes.

@bblanchon
Copy link
Owner

Hi @juancgalvez,

The JSON format doesn't support hexadecimal notation.

ArduinoJson 5 was less picky and didn't impose quotes around strings.
If anything, it's a bug in version 5 but not in version 6.

Best regards,
Benoit

@juancgalvez
Copy link
Author

You are right. I fixed he issue by including values in quotes.

Thank you and excuse me for reporting a false bug.

@bblanchon
Copy link
Owner

You're welcome, @juancgalvez.
Thank you for using ArduinoJson!
Don't forget to cast a star to support the project 😉

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 17, 2022
@bblanchon bblanchon added the v6 ArduinoJson 6 label Feb 6, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
question v6 ArduinoJson 6
Projects
None yet
Development

No branches or pull requests

2 participants