decode() misparses end-of-file “relaxed” comment
FGasper opened this issue · comments
> perl -MCpanel::JSON::XS -e'print $Cpanel::JSON::XS::VERSION . $/; print Cpanel::JSON::XS->new()->relaxed(1)->decode(q<["ha"] # ohyeah>)'
4.24
garbage after JSON object, at character offset 16 (before "") at -e line 1.
^^ The above should parse, right?
JSON::XS 4.x has the same problem, though 3.x parsed it.
Definitely a regression, introduced with 3.0220
, thanks a lot!
In particular with commit 9b82904
Date: Fri Oct 28 00:03:49 2016 +0200
Fix n_number_then_00 spectest
Fixed detection of final \0 as illegal non-whitespace garbage.
Fixes spectest n_number_then_00. #72
Fixed with 4.25