Yojson.Basic.Util.to_float fails to parse numbers written without a
decimal point (e.g. 0 instead of 0.0). Most json tools don't make
this distinction, so this is a compatibility hazard. The to_number
parser combinator can handle numbers with or without decimal points.
I ran into this issue when I tried to pretty-print input files to compression:
This pull request includes the rebuilt binaries, but if you'd prefer I can submit one that just has the changes to the .ml files and you can update the binaries yourself.
Yojson.Basic.Util.to_float
fails to parse numbers written without a decimal point (e.g. 0 instead of 0.0). Most json tools don't make this distinction, so this is a compatibility hazard. Theto_number
parser combinator can handle numbers with or without decimal points.I ran into this issue when I tried to pretty-print input files to
compression
:worked fine, but
triggered an error.