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?