Thu Aug 26 12:42:37 2010TODDR [...] cpan.org - Ticket created
Subject:
Simple numbers (0) are quoted in JSON
This new test is failing. I'm pushing the new test to github now.
is(Dump(0), '0', '"0" != 0 in JSON. 0 is false "0" is true.');
Thu Aug 26 14:25:34 2010TODDR [...] cpan.org - Correspondence added
A fix for this is being released as 1.13
Thu Aug 26 14:25:36 2010TODDR [...] cpan.org - Status changed from 'new' to 'open'
Thu Aug 26 14:25:48 2010TODDR [...] cpan.org - Status changed from 'open' to 'resolved'
Thu Aug 26 14:35:12 2010FELIPE [...] cpan.org - Correspondence added
On Thu Aug 26 12:42:37 2010, TODDR wrote:
Show quoted text
> This new test is failing. I'm pushing the new test to github now.
>
> is(Dump(0), '0', '"0" != 0 in JSON. 0 is false "0" is true.');
Suggest also adding:
is(Dump('0'), '"0"', 'Preserve string "0" from perl to JSON.');
Thu Aug 26 14:35:13 2010The RT System itself - Status changed from 'resolved' to 'open'
Thu Aug 26 16:44:43 2010TODDR [...] cpan.org - Correspondence added
in Javascript, "1" + "1" = "11"
As a result if it's a perl string we should always leave it as such, not try to take off the quotes.
I've added an #ifdef to make this check specific to YAML. JSON will always quote strings.
Released as 1.14
Thu Aug 26 16:44:48 2010TODDR [...] cpan.org - Status changed from 'open' to 'resolved'