update CSpot

This commit is contained in:
philippe44
2022-03-04 20:06:19 -08:00
parent 7b1d1ad45e
commit 57b77766ff
28 changed files with 226 additions and 110 deletions

View File

@@ -42,4 +42,11 @@ std::string bell::JSONObject::toString()
free(body);
return retVal;
}
}
std::vector<uint8_t> bell::JSONObject::toVector() {
char *body = cJSON_Print(this->body);
std::vector<uint8_t> res(body, body + strlen(body));
free(body);
return res;
}