We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Actually, I have the following definition:
struct Sensor { int value; int type; }; class SensorState { public: Sensor sensors[4]; static void read(SensorState& settings, JsonObject& root) { for (int i = 0; i < 4; i++) { root["value"][i] = settings.sensors[i].value; root["type"][i] = settings.sensors[i].type; } } ... };
I would like to use a JSON array instead of an object to have code that looks more like this:
class SensorState { public: Sensor sensors[4]; static void read(SensorState& settings, JsonArray& root) { for (int i = 0; i < 4; i++) { root[i]["value"] = settings.sensors[i].value; root[i]["type"] = settings.sensors[i].type; } } ... };
Do you know how I can do that? I tried modifying StatefullService to accept arrays, but I confess I'm not proficient enough in C++ to accomplish it.
I love this framework and I congratulate @rjwats once again for creating it. It would be great in my case if I could pass arrays instead of objects.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Actually, I have the following definition:
I would like to use a JSON array instead of an object to have code that looks more like this:
Do you know how I can do that?
I tried modifying StatefullService to accept arrays, but I confess I'm not proficient enough in C++ to accomplish it.
I love this framework and I congratulate @rjwats once again for creating it.
It would be great in my case if I could pass arrays instead of objects.
The text was updated successfully, but these errors were encountered: