YAML (and some yaml-cpp)

Started by
0 comments, last by B_old 14 years, 1 month ago
Hi, is this a proper YAML document?

---
maxChannels: 37
animations:
 - name: Loitering
   stuff: blabla
 - name: Walk
   stuff: lalala
...


When parsing this with yaml-cpp I don't get an error. But if I'm starting to iterate through the nodes I stumble upon one uninitialized node (somewhere after "animations") which causes a crash. A little bit scary that yaml-cpp doesn't warn me. When I iterate through nodes, how do I read the node's "name"? I seem to be unable to find that info... Thanks for any advice!
Advertisement
Turns out that I was accidentally indexing a Node* instead of using the overloaded operator[]. After correcting that error things became somewhat clearer. :)

This topic is closed to new replies.

Advertisement