The JSON parser needs to modify the incoming data so you can’t pass the data parameter since it’s marked const. So you need to create a copy which you can mess up as you like
void condHandler(const char *event, const char *data) {
char copy[strlen(data)+1]; // depeinding on your JSON you may need some extra bytes
strcpy(copy, data);
JsonObject& root = jsonBuffer.parseObject(copy);
}
Some care needs to be taken to ensure your copy doesn’t blow the stack away. I would suggest a static buffer of fixed length that you consider big enough to hold a typical string, with a safe copy function to ensure you don’t blow that away. Always beware of buffer overflows and safe coding practices.