parseJSON bug

khurshid khurshid.normuradov at gmail.com
Thu Aug 8 05:15:52 PDT 2013


On Thursday, 8 August 2013 at 12:08:00 UTC, khurshid wrote:
>
> std.json  parseJSON has a bug,
>
> //                         leading whitespaces
> auto json = parseJSON("1                                  
> .000");
>
> -- should throws, but it's success parsed as `1.000` .
>
>
> Khurshid...

Or more...

auto json = parseJSON(`{ "one": 1        .24E          +1    
}`);//should throws.
writeln(toJSON(&json)); // printed `{"one":12.4}`


More information about the Digitalmars-d mailing list