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

Get the Android app

Or read this on Hacker News

Read more on:

Photo of yaml

yaml

Photo of Norway Problem

Norway Problem

Related news:

News photo

Show HN: Holos – Configure Kubernetes with CUE data structures instead of YAML

News photo

Why can't we separate YAML from ML?

News photo

New better alterative to XML, JSON and YAML