< Back to LAB174.com 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 Now let’s write a simple script to parse the yaml file: # python-pyyaml.py import json import yaml with open("project.yaml", "r", encoding="utf-8") as f: data = yaml.safe_load(f) print(json.dumps(data, indent=2)) Running python3 python-pyyaml.py produces this output: { "title": "Nonoverse", "description": "Beautiful puzzle game about nonograms.", "link": "https://lab174.com/nonoverse", "countries": [ "DE", "FR", "PL", "RO" ] } So far everything behaves as expected. The Norway problem in yaml When we change the original yaml file and add Norway’s two letter iso country code to the existing list: countries: - DE - FR - NO - PL - RO Using the same parsing method, the file now yields this result: { "title": "Nonoverse", "description": "Beautiful puzzle game about nonograms.", "link": "https://lab174.com/nonoverse", "countries": [ "DE", "FR", false, "PL", "RO" ] } Note that NO has been replaced with false. This is unexpected. Nothing about the context suggests a boolean should appear here. The NO literal sits in a list of country codes like FR or PL and appears similar in form. The problem, of course, is that “no” is also an English word with a negative meaning. This feature was originally added to allow writing booleans in a more human readable way, e.g.: platforms: iPhone: yes iPad: yes AppleWatch: no This gets parsed as: { "platforms": { "iPhone": true, "iPad": true, "AppleWatch": false } } The idea was that configuration files ...
First seen: 2026-05-23 00:27
Last seen: 2026-05-23 03:28