object.coffee 485 B

123456789101112131415161718192021
  1. perf 'Create simple object', 100000, (run) ->
  2. obj =
  3. ele: "simple element"
  4. person:
  5. name: "John"
  6. '@age': 35
  7. '?pi': 'mypi'
  8. '#comment': 'Good guy'
  9. '#cdata': 'well formed!'
  10. unescaped:
  11. '#raw': '&<>&'
  12. address:
  13. city: "Istanbul"
  14. street: "End of long and winding road"
  15. contact:
  16. phone: [ "555-1234", "555-1235" ]
  17. id: () -> return 42
  18. details:
  19. '#text': 'classified'
  20. run () -> xml(obj)