Skip to content
Tina Müller (tinita) edited this page Jan 2, 2018 · 7 revisions

Here is an example of a YAML file and its parsing events:

# YAML
---
key a: 1
key b: 
- item 1
- item 2
1. stream-start
2. document-start
3. mapping-start
4. scalar 'key a'
5. scalar '1'
6. scalar 'key b'
7. sequence-start
8. scalar 'item 1'
9. scalar 'item 2'
10. sequence-end
11. mapping-end
12. document-end
13. stream-end

These are the events in test suite format:

+STR
+DOC
+MAP
=VAL :key a
=VAL :1
=VAL :key b
+SEQ
=VAL :item 1
=VAL :item 2
-SEQ
-MAP
-DOC
-STR

DocumentStartEvent

  • implicit: true/false
DocumentStartEvent(implicit=true)
+DOC
DocumentStartEvent(implicit=false)
+DOC ---
Clone this wiki locally