Deserializing YAML using YamlDotNet when the root node of each object is named using it's ID?
<p>I'm using C# and I have a YAML file I want to deserialize.</p>
<p>I've looked at using YamlDotNet, and it looks like it's pretty decent, but I can't find how to handle this situation.</p>
<p>The YAML text I am working with has the following format:</p>
<pre><code>1:
    id: 1
    name: foo
2:
    id: 2
    name: foo
</code></pre>
<p>I wish it looked like this instead, but it doesn't:</p>
<pre><code>- id: 1
  name: foo
- id: 2
  name: foo
</code></pre>
<p>I can of course revert to doing everything much more manually, by looping over each node and manually creating the data object instances, but it seems like there should still be a way to have the ease of use from YamlDotNet while handling this annoying data structure.</p>
<p>I'm open to suggestions for other YAML parsing libraries in .NET.</p>