Documentation for version v0.40.0 is no longer actively maintained. The version you are currently viewing is a static snapshot. For up-to-date documentation, see the latest version.
ytt includes strict YAML subset mode that tries to remove any kind of ambiguity in user’s intent when parsing YAML.
Unlike full YAML, strict subset:
- only supports specifying nulls as "" or
- only supports specifying bools as
- only support basic int and float declarations
- prefix, suffix, octal notation, etc are not supported
- requires strings with whitespace to be explicitly quoted
- requires strings with colon to be explicitly quoted
- requires strings with triple-dash (document start) to be explicitly quoted
$ echo 'key: yes' | ytt -f- key: true
$ echo 'key: yes' | ytt -f- -s Error: Unmarshaling YAML template 'stdin.yml': yaml: Strict parsing: Found 'yes' ambigious (could be !!str or !!bool)
To fix error, explicitly make it a string:
$ echo 'key: "yes"' | ytt -f- -s key: "yes"
or via YAML tag
$ echo 'key: !!str yes' | ytt -f- -s key: "yes"
(Help improve our docs: edit this page on GitHub)