Posted By

1man on 03/17/09


Tagged

data syntax markup yaml


Versions (?)

Example of YAML Markup


 / Published in: Other
 

Simple markup example in YAML.

  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  

You need to login to post a comment.