I checked the code and json_get_field() formats the result in a JSON value,
making strings to be enclosed in the quotes. This is to support cases when the
value of requested key is a structure, so practically the result in this case
will be a JSON serialization of the structure. I just added a note to clarify
this in the docs of the module.
I think this is ok over all. Maybe there should be added some helper functions
to get string or int values, like json_get_string() and json_get_int().
Otherwise, jansson module is supposed to be like ng version of the json module,
with more features (e.g., json-path support).
I am closing this one because it is how the module was coded. I will try to add
the helper functions when I get a chance, or maybe someone else does it
meanwhile ... @eschmidbauer did some work lately with the json module, maybe he
can jump in here ...
--
You are receiving this because you commented.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/1452#issuecomment-368855982
_______________________________________________
Kamailio (SER) - Development Mailing List
sr-dev@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev