YAML? That’s Norway problem Abstract A deep dive into YAML’s Norway problem: why the country code NO gets parsed as false, its history from YAML v1.0 to v1.2, and why popular libraries still exhibit this behavior in 2026. A deep dive into YAML’s Norway problem: why the country code NO gets parsed as false, its history from YAML v1.0 to v1.2, and why popular libraries still exhibit this behavior in 2026.
What is yaml
Yaml is a well-known data serialization language designed for human readability. It’s a popular choice for configuration files and metadata. Here’s a simple example:
# project.yaml title : Nonoverse description : Beautiful puzzle game about nonograms. link : https://lab174.com/nonoverse countries : - DE - FR - PL - RO
Let’s verify that the above example parses correctly.
We’ll use Python with PyYaml version 6.0.3 (the latest version as of this writing). First, let’s install it:
python3 -m pip install pyyaml==6.0.3 pip install pyyaml==6.0.3
Now let’s write a simple script to parse the yaml file:
# python-pyyaml.py import json json import yaml yaml with open ( "project.yaml" , "r" , encoding = "utf-8" ) as f: , encodingf: = yaml.safe_load(f) datayaml.safe_load(f) print (json.dumps(data, indent = 2 )) (json.dumps(data, indent))
Running python3 python-pyyaml.py produces this output:
... continue reading