I'm playing around with the consumer.c example file for librdkafka and I'm trying to figure out how to convert the rkm payload (that is printed out at line 244) to json so that I can grab a parameter's value from the json.
Right now I'm using jansson but am having some problems with it which I can expand on if needed.
Is there a feature for this in librdkafka or the standard C libraries that I'm unaware of?
Simply pass the message payload (binary) and length to Jansson, like so:
See the Jansson docs for more info: https://jansson.readthedocs.io/en/latest/tutorial.html