Error with MemberProxy | JsonObject
Created by: labodj
Hi @bblanchon, after you fixed the code for the issue #1411 (closed) I posted yesterday I've discovered another problem (keep in mind that I'm testing with upstream code @ ff66182d), I'm using this library in conjunction with homie-esp8266, more precisely with my fork
They committed yesterday to stay on an older ArduinoJson version because 6.17.0 has some problems with their library, I think it's not so smart not opening an issue here, (it's one of the reason why I am mantaining a fork), one was #1411 (closed), the other one is this:
.pio/libdeps/release/Homie/src/Homie/Utils/Validation.cpp:374:84: required from here
.pio/libdeps/release/ArduinoJson/src/ArduinoJson/Variant/VariantAs.hpp:64:55: error: no type named 'type' in 'struct ArduinoJson6170_91::enable_if<false, ArduinoJson6170_91::ObjectRef>'
more precisely I can trigger the error like so:
#include <Arduino.h>
#include <ArduinoJson.h>
void setup()
{
}
void loop()
{
StaticJsonDocument<JSON_OBJECT_SIZE(1)> doc;
JsonObject object = doc.to<JsonObject>();
object["hello"] = "world";
StaticJsonDocument<0> emptyDoc;
JsonObject anotherObject = object["hello"] | emptyDoc.to<JsonObject>();
}