[SR-Users] JANSSON Delete from JSON

Jeremy McNamara mcnamara.jeremy at gmail.com
Sat Mar 20 23:09:17 CET 2021


Hi Folks - I am using JANSSON to store JSON data in an htable.  How does
one remove an entire element from a JSON?

I do not see a specific function mentioning clear or remove exposed in the
Kamailio module, but do see various clear/remove methods in the underlying
C library.

Below does set the value of key foo to null.  I would like to remove both
the key and value of foo.

jansson_set("null", "$var(foo)", "$var(json)", "$var(result)");


Running Kamailio v5.4
Debian 10


-Jeremy
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-users/attachments/20210320/db33404b/attachment.htm>


More information about the sr-users mailing list