HELLO, I’M SERHAT AND THIS IS MY FANCY TITLE.

Boolean Type Words in YAML


YAML is a widely used data serialization language. In any software development project, or a random dev-ops task you can come across with YAML. For example Ruby on Rails uses YAML for fixtures, configuration files and localization. CI/CD tools such as CircleCI and Travis also use YAML for configuration. If you ever experienced a strange behaviour with YAML, you may have used the reserved words of YAML. YAML reserves some words such as 'yes', 'no', 'y', 'n', 'off', 'on', etc. for boolean type. For example:

yes:
    turkish: evet
    german: ja
    english: yes
no:
    turkish: hayır
    german: nein
    english: no

will be interpreted as:

true:
    turkish: evet
    english: true
false:
    turkish: hayır
    english: false
Continue reading
Date: | Tags: yaml, yaml reserved words, yaml boolean type | Categories: tech, ruby, ruby on rails