Hello Samuel,

Thanks, this wasn't entirely clear to me. It seems to work indeed.

Regards, Leonard

On 8-11-2013 09:35, Samuel Mimram wrote:
> Hi,
>
> I think that this is a typing problem. Because you used "test" as a
> default value, Liquidsoap expects a string as output. It correctly
> parses 0 as an integer, but since this is of the wrong type (it's an
> integer) it will output the default value. The following should work:
>
> print(of_json(default=42,"0"))
>
> (it should print 0 and not 42). To sum up, be careful in choosing a
> default value of the right type!
>
> Cheers,
>
> Samuel.
>
> On Fri, Nov 8, 2013 at 9:15 AM, Leonard de Ruijter <[email protected]> wrote:
>> Hey,
>>
>> I'm trying to import json data using of_json
>> print(of_json(default="test","0")) prints the default value, eventhough
>> it's supposed to print the integer 0
>> I'm using Liquidsoap Win32. Could it be that the Win32 version of
>> Liquidsoap is compiled without json support? If so, could that be
>> resolved in a newer release?
>>
>> Regards,
>> Leonard
>>
>> ------------------------------------------------------------------------------
>> November Webinars for C, C++, Fortran Developers
>> Accelerate application performance with scalable programming models. Explore
>> techniques for threading, error checking, porting, and tuning. Get the most
>> from the latest Intel processors and coprocessors. See abstracts and register
>> http://pubads.g.doubleclick.net/gampad/clk?id=60136231&iu=/4140/ostg.clktrk
>> _______________________________________________
>> Savonet-users mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/savonet-users
>
> ------------------------------------------------------------------------------
> November Webinars for C, C++, Fortran Developers
> Accelerate application performance with scalable programming models. Explore
> techniques for threading, error checking, porting, and tuning. Get the most
> from the latest Intel processors and coprocessors. See abstracts and register
> http://pubads.g.doubleclick.net/gampad/clk?id=60136231&iu=/4140/ostg.clktrk
> _______________________________________________
> Savonet-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/savonet-users
>

------------------------------------------------------------------------------
November Webinars for C, C++, Fortran Developers
Accelerate application performance with scalable programming models. Explore
techniques for threading, error checking, porting, and tuning. Get the most 
from the latest Intel processors and coprocessors. See abstracts and register
http://pubads.g.doubleclick.net/gampad/clk?id=60136231&iu=/4140/ostg.clktrk
_______________________________________________
Savonet-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/savonet-users

Reply via email to