What are the extensions of YAML file?

Category: YAMLWhat are the extensions of YAML file?
Editor">Editor Staff asked 2 years ago

Explain the Structures in YAML?

1 Answers
Editor">Editor Staff answered 2 years ago

Structures

  • To separate directives from document content, YAML uses three dashes (– – –).
  • To end the document, YAML uses three dots(. . .).

Example
# Learning resources in Expskill
– – –
– LinkedIn
– Lynda
– Skillsoft

  • Repeated nodes are first identified as anchor ( indicated by the symbol &)
  • The subsequent sequences are then aliased ( indicated by the symbol *)
  • A question mark and a space indicates a complex mapping key.
  • For anchors and alias to work with maps and sequences inject >>.

Example

Software Companies:
– TCS
– &Apple  # First occurrence
– IBM
Fruits:
– *Apple # subsequent occurrence
Structure Examples
Example2
? – ExpSkill  – Fresco PLAY:  12-11-2018
Example 3
default: &default  school: hogwarts harry:  <<: *default  house: gryffindor