[OpenSIPS-Users] JSON errors
Brett Nemeroff
brett at nemeroff.com
Fri Jan 4 17:43:07 CET 2013
Sorry for the confusion.. I am indeed doing:
$json(foo) := "{}";
To initialize the object every time.. As a side note, if I *don't* do that,
I get a failure.
-Brett
On Fri, Jan 4, 2013 at 12:49 AM, Răzvan Crainea <razvan at opensips.org> wrote:
> Hi, Brett!
>
> The only problem I can see with your construction is that you do not
> properly initialize the JSON object: $json(foo) = "{}". When the "="
> operator is used, the "{}" is interpreted as a simple string, not as a
> JSON format. You should have used the ":=" which parses "{}" as a JSON
> format and constructs a proper JSON structure, that is populated
> afterwards with the desired value.
> Anyway, I am not sure why you get that bogus "value". When I replicated
> your code, the JSON module returns an error when the $json(foo/bar) value
> is retrieved.
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20130104/8f0e8fa6/attachment.htm>
More information about the Users
mailing list