DefaultValue not applied if JsonVariant incompatible with type uint8_t.
Created by: genericom-dds
#include <iostream>
#include <stdint.h>
#define ARDUINOJSON_EMBEDDED_MODE 1
#include "ArduinoJson.h"
int main() {
StaticJsonDocument<300> doc;
deserializeJson(doc, "{v:2222}");
JsonVariant v = doc["v"];
uint8_t i = v | (uint8_t)123;
std::cout << "v=" << (int)i << '\n';
return 0;
}
Tested with version 6.10.1 Expected output: v=123 Actual output: v=0