Hi,
there are also two lines in the json scanner where it tries to repair numbers with leading dots '.123' to '0.123':

         If (FCurTokenString[1]='.') then
          FCurTokenString:='0'+FCurTokenString;

They should probably be removed. Not only are those numbers invalid in json, it is also very slow to allocate a new string. And StrToFloat works with '.123', so it should not change anything.

Although removing them would break programs that cannot handle '.123', they are broken anyways, because it is not adding a zero to  '-.123'.


Best,
Benito
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Reply via email to