Not really a fan of the recent change with the handling of floats.
There's now a disconnect between the handling in the readers and writers, with the reader having no problem creating a value that will be rejected by the writer.
For instance, this now crashes:
let () =
"[ 1e999 ]"
|> Yojson.Safe.from_string
|> Yojson.Safe.to_string
|> print_endline
Granted, it wasn't round-tripping before, but at least it went from a valid JSON document to another valid JSON document.
I get the idea of making the std flag the default, but there's merit to the old approach of printing "infinity".
Not really a fan of the recent change with the handling of floats.
There's now a disconnect between the handling in the readers and writers, with the reader having no problem creating a value that will be rejected by the writer.
For instance, this now crashes:
Granted, it wasn't round-tripping before, but at least it went from a valid JSON document to another valid JSON document.
I get the idea of making the
stdflag the default, but there's merit to the old approach of printing "infinity".