Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • A ArduinoJson
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 24
    • Issues 24
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Benoît Blanchon
  • ArduinoJson
  • Issues
  • #1415
Closed
Open
Issue created Oct 22, 2020 by Administrator@rootContributor

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>();
}
Assignee
Assign to
Time tracking