yaml

Quote a value safely for a YAML scalar.

Syntax

{{ value | yaml }}

Example

01

Basic usage

InputTS
1{2  "title": "A: value #1"3}
TemplateKNAP
1{{ title | yaml }}
OutputKNAP
1"A: value #1"

Behavior

  • Canonical numbers, booleans, and null are preserved. Ambiguous strings are quoted.