[sr-dev] [kamailio/kamailio] Strange behaviour with JSON module (#1452)

Thomas Carvello notifications at github.com
Wed Feb 21 16:41:27 CET 2018


<!--
Kamailio Project uses GitHub Issues only for bugs in the code or feature requests.

If you have questions about using Kamailio or related to its configuration file,
ask on sr-users mailing list:

  * http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users

If you have questions about developing extensions to Kamailio or its existing
C code, ask on sr-dev mailing list

  * http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev

Please try to fill this template as much as possible for any issue. It helps the
developers to troubleshoot the issue.

If you submit a feature request (or enhancement), you can delete the text of
the template and only add the description of what you would like to be added.

If there is no content to be filled in a section, the entire section can be removed.

You can delete the comments from the template sections when filling.

You can delete next line and everything above before submitting (it is a comment).
-->

### Description

<!--
Explain what you did, what you expected to happen, and what actually happened.
-->

### Troubleshooting

#### Reproduction

Hello, 
i have an issue with the JSON module . 

i have JSON response from a HTTP request to process in my script:

{"status":"SUCCESS"}

i use the command HTTP_query:

_http_query("http://xxxxx", "$var(result)");_

then i try to parse my result:

_json_get_field("$var(result)", "status", "$var(status)");_
		
But when i log my result:
_xlog("L_INFO", "$var(status)");_

i have a wrong output:

 _INFO: <script>: "SUCCESS"_

double quote is embedded in the string variable which is wrong because this not part of my json value.

Is there any way to fix this behaviour or having a new function in order to retrieve the right value of my json field?

Thank you for your help.



-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/1452
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-dev/attachments/20180221/18125096/attachment.html>


More information about the sr-dev mailing list