Skip to content

".is<uint8_t>() == true" doesn't return true #2172

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

Closed
enjoyneering opened this issue Apr 18, 2025 · 1 comment
Closed

".is<uint8_t>() == true" doesn't return true #2172

enjoyneering opened this issue Apr 18, 2025 · 1 comment
Labels
bug v7 ArduinoJson 7

Comments

@enjoyneering
Copy link

enjoyneering commented Apr 18, 2025

The following code does not work with the latest version 7.4.1

 if (jsonDoc["pin"].is<uint8_t>() == true)
 {
  relayConfig.pin  = jsonDoc[F("pin")]; 
}

Environment
Here is the environment that I used:

  • Microcontroller: ESP8266
  • Core/runtime: ESP8266 core for Arduino v3.0.2
  • IDE: Arduino IDE 1.8.16
@bblanchon
Copy link
Owner

Hi @enjoyneering,

Thank you for reporting this issue.

However, I could not reproduce it.
See online demo: https://wandbox.org/permlink/2dYfj8erK4q8xKR5

Could you provide an MCVE?

Best regards,
Benoit

@bblanchon bblanchon added the v7 ArduinoJson 7 label Apr 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug v7 ArduinoJson 7
Projects
None yet
Development

No branches or pull requests

2 participants