Difference between revisions of "YAML"

From Teknologisk videncenter
Jump to: navigation, search
(Created page with "=Structure= ==Block and flow style== ===Block style=== '''Lists:''' <source lang=yaml> fruits: - apple - banana - orange </source> '''Maps:''' <source lang=yaml> </source>")
 
m
Line 9: Line 9:
 
   - orange
 
   - orange
 
</source>
 
</source>
'''Maps:'''
+
'''Maps/dictionary:'''
 
<source lang=yaml>
 
<source lang=yaml>
 +
address:
 +
  street: "H.C. Andersens vej 9"
 +
  city: Viborg
 +
  zip: 8800
 +
</source>
 +
===Flow style===
 +
'''Lists:'''
 +
<source lang=yaml>
 +
fruits: [apple, banana, orange]
 +
</source>
 +
'''Maps:/dictionary:'''
 +
<source lang=yaml>
 +
address: {street: "H.C. Andersens vej 9",  city: Viborg,  zip: 8800 }
  
 
</source>
 
</source>

Revision as of 10:47, 12 December 2023

Structure

Block and flow style

Block style

Lists:

fruits:
  - apple
  - banana
  - orange

Maps/dictionary:

address:
  street: "H.C. Andersens vej 9"
  city: Viborg
  zip: 8800

Flow style

Lists:

fruits: [apple, banana, orange]

Maps:/dictionary:

address: {street: "H.C. Andersens vej 9",  city: Viborg,  zip: 8800 }