Get the latest tech news
YAML: The Norway Problem (2022)
Earlier this week, Haroen Viaene posted this tweet about YAML: worst part of yaml: https://yaml.org/type/bool.html — Haroen Viaene (@haroenv) January 10, 2022 The linked-to page contains the documentation on what defines a boolean in YAML, and details that it can be parsed using this regex: y|Y|yes|Yes|YES|n|N|no|No|NO |true|True|TRUE|false|False|FALSE |on|On|ON|off|Off|OFF The reason to why this is problematic … Continue reading "YAML: The Norway Problem"
The linked-to page contains the documentation on what defines a boolean in YAML, and details that it can be parsed using this regex: 👉 The solution is to either escape these values in double quotes, or to use a library — such as StrictYAML for Python — that won’t convert NO to False. From the moment he discovered view-source at the age of 14(way back in 1997), he fell in love with the web and has been tinkering with it ever since(more …) View more posts
Or read this on Hacker News