Yaml - Scalar

Yaml Representation


There are 5 styles of scalars in YAML:

  • plain, - A plain scalar does not use indicators to denote its start and end
  • single-quoted, - to express any value that does not contain special characters - No escaping occurs except that duplicate quotes '' are replaced with a single quote '
  • double-quoted, - can express any scalar value by allowing escaping with the following sequences:
    • \x** for ASCII
    • \u**** for Unicode character.
  • literal (block), indicated by | where all line breaks are significant (A little bit the same than a here doc)
  • and folded (block) - similar to the literal style, but two consequent non-empty lines are joined to a single line separated by a space character.
plain: Scroll of Remove Curse
single-quoted: 'EASY_KNOW'
double-quoted: "?"
# ASCII Art 
literal: |
  // ||  ||__
folded: >
  It removes all ordinary curses from all equipped items.
  Heavy or permanent curses are unaffected.

Documentation / Reference

Discover More
Yaml Representation
YAML Ain’t Markup Language (YAML)

YAML minimizes the amount of structural characters in order to view and understand more easily the data. For example: indentation may be used for structure, colons separate key: value pairs, ...

Share this page:
Follow us:
Task Runner