Re:The YAML Document from Hell
by ilyt on Thursday January 12, 2023 @08:25AM
(#34353110)
The "edge case" here is "I'm using dynamically typed language and some parsers implemented alternative wording for true/false"
[ Parent
| on HN ]
It was a part of the YAML spec for a long time, so it has nothing to do with dynamic typing or parser extensions.
It does. If I define struct to contain boolean, Go yaml parser will always parse it to boolean
If I define it as any other type, it will parse it as that type. So any conflicts like in the article just don't happen, or at worst, produce error in parsing.
Static typing in this case acts essentially as schema
Re:The YAML Document from Hell
by lifehasleft on Friday January 13, 2023 @09:40AM
(#34368308)
Go isn’t the only language using YAML