For example if I paste this:
---
thing:
description: "Oh boy."
stuff:
- "i am a string"
- null
- ~
- "null"
into http://www.yamllint.com/ and click "go", then the output is like this - the unquoted null
got turned into a tilde:
---
thing:
description: "Oh boy."
stuff:
- "i am a string"
- ~
- ~
- "null"
And if I load it in python, I get this (two Nones and a string "null"
):
>>> import yaml
>>> data = yaml.load(open('foo.yaml', 'r'))
>>> data
{'thing': {'stuff': ['i am a string', None, None, 'null'], 'description': 'Oh boy.'}}