[web-devel] RFC: Upcoming change in yaml parsing

Michael Snoyman michael at snoyman.com
Thu May 24 18:04:51 CEST 2012


Hi all,

Before releasing to Hackage, I wanted to see if anyone has objections
to an upcoming change in the yaml library. The issue[1] is that values
that can be parsed as numbers are currently treated as numbers, even
if they're quoted. The change will instead treat any quoted value as a
string, and only unquoted values will be parsed. In other words:

Currently: decode "'1234'" == Number 1234
Changed: decode "'1234'" == String 1234

(Note the single quotes inside the double quotes.)

This will cause a small change in semantics, and in theory could break
people's code, though frankly I think the current behavior is a bug.
If people have objections to the change, let me know.

Michael

[1] https://github.com/snoyberg/yaml/issues/8



More information about the web-devel mailing list