I'm comparing the Spyc with the Symfony YAML parser. In my testing, I found that Spyc incorrectly parses hyphens cannot read incorrect hyphens when uses in a list. Take the following YAML example:
This problem can also be solved by adding quotes around the troublesome hyphen in the original YAML, but Symfony's default exporter does not include this in generated YAML, making it so an exported YAML file from Symfony will contain an error when read by Spyc.
I understand Symfony and Spyc implement different versions of the YAML standard, and indeed Symfony might be in the wrong here, per the 1.0 spec at least:
Indicators are special characters that are used to describe the structure of a YAML document. In general, they cannot be used as the first character of a plain scalar.
So this may not be a Spyc decoder issue but a Symfony encoder issue. I thought I'd report it here nonetheless.
EDIT: I updated the title and description to be clear that I think this is an encoding issue. It probably should just be invalid, but I'm double-checking.
Hi there,
I'm comparing the Spyc with the Symfony YAML parser. In my testing, I found that Spyc
incorrectly parses hyphenscannot read incorrect hyphens when uses in a list. Take the following YAML example:In Spyc, this converts to a PHP array like this:
But it should be:
This problem can also be solved by adding quotes around the troublesome hyphen in the original YAML, but Symfony's default exporter does not include this in generated YAML, making it so an exported YAML file from Symfony will contain an error when read by Spyc.
I understand Symfony and Spyc implement different versions of the YAML standard, and indeed Symfony might be in the wrong here, per the 1.0 spec at least:
So this may not be a Spyc decoder issue but a Symfony encoder issue. I thought I'd report it here nonetheless.
EDIT: I updated the title and description to be clear that I think this is an encoding issue. It probably should just be invalid, but I'm double-checking.