[OpenSIPS-Users] JSON Bug, empty strings

Bogdan-Andrei Iancu bogdan at opensips.org
Mon Feb 11 14:41:39 CET 2013


Hi Brett,

Empty string is not a valid json string....maybe "{}".
Check the grammar on http://www.json.org/ and a validator on  
http://jsonlint.com/

Regards,

Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com


On 02/10/2013 07:39 PM, Brett Nemeroff wrote:
> Hey all,
> I think I see a bug in the JSON module; but it might just be a 
> "feature" of JSON.
>
> Seems that when I assign an empty string to a JSON element, it's 
> storing it as NULL. So for example:
>
> $json(object/element) = '';
>
> If I print that, I get <null> in an xlog.
>
> Is this expected? I'd really like to be able to store empty strings.
>
> Thanks!
> -Brett
>
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20130211/915728d7/attachment.htm>


More information about the Users mailing list