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
  • #19
Closed
Open
Issue created Sep 14, 2014 by Administrator@rootContributor

Dynamic size

Created by: leventesen

It will be perfect if we can find a way to let the size to be dynamic in your Parser and/or Generator :)

I think generator will not be too much tricky compared to parser. Without breaking the code, you can add extra classes that will merge the static allocated objects and arrays.

Here is an example:

JsonObject<2> staticObject1;
JsonObject<1> staticObject2;

staticObject1["key1"] = 1;
staticObject1["key2"] = 2;
staticObject2["key3"] = 3;

DynamicJsonObject dynamicObject;

dynamicObject.merge(staticObject1);
dynamicObject.merge(staticObject2);

Serial.print(dynamicObject);
Assignee
Assign to
Time tracking