[SR-Users] JANSSON module not working for multiple JSON objects

Daniel-Constantin Mierla miconda at gmail.com
Tue Apr 25 16:17:34 CEST 2017


Hello,


On 25.04.17 15:57, vivek at advaitamtech.com wrote:
>
> Hi All,
>
>  
>
> Am using JANSSON module to parse the JSON object I receive.
>
>  
>
> I tried using JSON module of kamailio. Since its giving error in
> loading the module due to  error"libjson-c.so.3: cannot open shared
> object file: No such file or directory", I went ahead to use JANSSON
> module.
>
>  
>
> JANSSON module is parsing the single JSON object perfectly. But not
> parsing the multiple JSON objects.
>
>  
>
> JSON object am trying to parse:
>
> $avp(result1)=
> "[{"origin":"125.16.231.74","Dest":"725.76.731.77"},{"origin":"225.26.231.24","Dest":"225.26.231.27"}]"
>
>  
>
> JANSSON API used: jansson_get("origin", "$avp(result1)", "$var(origin)");
>
>  
>
> Any suggestions will be really helpful.
>
>
are there any error messages?

Cheers,
Daniel

-- 
Daniel-Constantin Mierla
www.twitter.com/miconda -- www.linkedin.com/in/miconda
Kamailio Advanced Training - May 22-24 (USA) - www.asipto.com
Kamailio World Conference - May 8-10, 2017 - www.kamailioworld.com

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-users/attachments/20170425/9d433cc0/attachment-0001.html>


More information about the sr-users mailing list