Example of YAML Markup


/ Published in: Other
Save to your folder(s)

Simple markup example in YAML.


Copy this code and paste it in your HTML
  1. /* Longhand version of YAML */
  2. $house = array(
  3. 'family' => array(
  4. 'name' => 'Doe',
  5. 'parents' => array('John', 'Jane'),
  6. 'children' => array('Paul', 'Mark', 'Simone')
  7. ),
  8. 'address' => array(
  9. 'number' => 34,
  10. 'street' => 'Main Street',
  11. 'city' => 'Nowheretown',
  12. 'zipcode' => '12345'
  13. )
  14. );
  15.  
  16. /* Same info but using a shorter syntax */
  17. house:
  18. family: { name: Doe, parents: [John, Jane], children: [Paul, Mark, Simone] }
  19. address: { number: 34, street: Main Street, city: Nowheretown, zipcode: 12345 }

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.