You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
i need to send a JSON object to a host.
i was hopping i could use the ArduionJson library like : serializeJson(doc,ws);
this is what i came up with till now: size_t length = measureJson(doc) + 1; char * msg = (char *) calloc(1, length); serializeJson(doc,msg,length); ws.send(msg); free(msg);
as you can see it is not very elegant.
any suggestions?
The text was updated successfully, but these errors were encountered:
hi
i need to send a JSON object to a host.
i was hopping i could use the
ArduionJson
library like :serializeJson(doc,ws);
this is what i came up with till now:
size_t length = measureJson(doc) + 1;
char * msg = (char *) calloc(1, length);
serializeJson(doc,msg,length);
ws.send(msg);
free(msg);
as you can see it is not very elegant.
any suggestions?
The text was updated successfully, but these errors were encountered: