3 ms·
> This is not a YAML problem, this is a “code that accepts and implicitly converts invalid data problem”. No, this is a YAML problem, because YAML is specified
by kelnos 3y ago
> This is not a YAML problem, this is a “code that accepts and implicitly converts invalid data problem”.
No, this is a YAML problem, because YAML is specified to allow for unquoted strings, and then it uses heuristics to decide if you meant a string or a number or (god forbid) a boolean.
So the "code that accepts..." that you're talking about is literally every conforming YAML parser out there. And they do that because the spec tells them to. So yes, it is a YAML problem.
And to top that off, most of the examples and tutorials you'll find on how to use YAML don't quote their strings. I get the idea: fewer characters to type, more human readable. But god it's a minefield.