[OpenSIPS-Users] mi_json returns invalid JSON

Kirill Galinurov k.galinurov at gmail.com
Tue Jul 17 05:58:56 EDT 2018


Hi. I use opensips mi_json module to get statistics.
But for some commands it returns incorrect JSON.
For example /json/dr_reload_status returns

{"Partition": [{"value":"sipprovider_def", "attributes":{"Date": "Mon Jul
16 07:10:58 2018
"}}, {"value":"beeline", "attributes":{"Date": "Mon Jul 16 07:11:59 2018
"}}, {"value":"megafon", "attributes":{"Date": "Mon Jul 16 07:11:59 2018
"}}, {"value":"megafon", "attributes":{"Date": "Mon Jul 16 07:12:54 2018
"}}, {"value":"mts", "attributes":{"Date": "Mon Jul 16 07:12:54 2018
"}}, {"value":"mts", "attributes":{"Date": "Mon Jul 16 07:13:51 2018
"}}, {"value":"beeline", "attributes":{"Date": "Mon Jul 16 07:13:52 2018
"}}]}

This is incorrect, because it shoulde not include "\n" symbols.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20180717/ccda7202/attachment.html>


More information about the Users mailing list