Explain the Seperation spaces in YAML?

Category: YAMLExplain the Seperation spaces in YAML?
Editor">Editor Staff asked 2 years ago

Explain the Seperation spaces in YAML?

1 Answers
Editor">Editor Staff answered 2 years ago
Seperation spaces

YAML uses white space characters between tokens in a line that is outside of indentation and scalar content.

  • white space also includes tab space.
  • separation spaces comes under presentation detail.

Line Prefix
Each line in scalar content begin with non-content line prefix (which includes indentation).

  • Flow scalar style includes leading white-spaces including tab spaces.
  • Line prefixes also come under presentation details.

Example:
%YAML 1.2—!!map {  ? !!str “plain”  : !!str “text lines”,  ? !!str “quoted”  : !!str “text lines”,  ? !!str “block”  : !!str “text\n·→lines\n”,}“`