You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is odd. The parser is a 1.1 parser which this was an extension that should be supported. I am treating this as a bug. Reference specification: https://yaml.org/type/int.html
Note: If the 1.2 conversion is ever completed, underscores in integers is no longer in specification. I would recommend against using this feature of 1.1. Some YAML 1.2 parsers are supporting it, although this is outside of the current specification.
I just ran into a potential issue with integer parsing, when combing reading and writing of the
yaml
R package with other packages/languages.According to the yaml integer specification:
However, if I
yaml::write_yaml(list("1_2_3"=4), file="test.yaml")
this gives me the following resulting file:If I read this with with another parser (e.g., in Python) I will get a
{123: 4}
, where the123
key is an integer.To be safe, should the package maybe quote all "integer and underscores" keys/values?
The text was updated successfully, but these errors were encountered: