title: Snakeyaml appears to unnecessarily wrap simple values in lists
body: <p>I am attempting to parse the following YAML file using Groovy and Snakeyaml (clearly I have sanitised the data but it is sufficient to demonstrate the issue):</p>
  
  <pre><code>---
  info:
    summary: Snakeyaml Issue
  examples:
    - 1st example:
        name: Example 1
        sublist:
          - 0.1:
             foo: bar
  </code></pre>
  
  <p>I would expect the following statements:</p>
  
  <pre><code>println resource.info.summary
  println resource.examples."1st example".name
  println resource.examples."1st example".sublist."0.1"
  </code></pre>
  
  <p>to yield:</p>
  
  <pre><code>Snakeyaml Issue
  Example 1
  [foo:bar]
  </code></pre>
  
  <p>and:</p>
  
  <pre><code>println resource.examples."1st example".sublist."0.1".foo
  </code></pre>
  
  <p>to yield:</p>
  
  <pre><code>bar
  </code></pre>
  
  <p>However, the <em>actual</em> output from:</p>
  
  <pre><code>println resource.info.summary
  println resource.examples."1st example".name
  println resource.examples."1st example".sublist."0.1"
  println resource.examples."1st example".sublist."0.1".foo
  </code></pre>
  
  <p>is:</p>
  
  <pre><code>Snakeyaml Issue
  [Example 1]
  [[[foo:bar]]]
  [[bar]]
  </code></pre>
  
  <p>I can only get the desired output by including the list indicies:</p>
  
  <pre><code>println resource.info.summary
  println resource.examples[0]."1st example".name
  println resource.examples[0]."1st example".sublist[0]."0.1"
  println resource.examples[0]."1st example".sublist[0]."0.1".foo
  </code></pre>
  
  <p>which seems unnecessary. Perhaps I am misunderstanding the structure of the data?</p>
  
  <p>For completeness, the groovy code that I am using to illustrate the issue is shown below (I grabbed the CustomerResolver code off the web so that it would keep floats as strings):</p>
  
  <pre><code>import org.yaml.snakeyaml.DumperOptions
  import org.yaml.snakeyaml.Yaml
  import org.yaml.snakeyaml.constructor.Constructor
  import org.yaml.snakeyaml.nodes.Tag
  import org.yaml.snakeyaml.representer.Representer
  import org.yaml.snakeyaml.resolver.Resolver
  
  def fileName = "example.yaml"
  def Yaml yaml = new Yaml(new Constructor(), new Representer(), new DumperOptions(),
      new CustomResolver())
  def resource = yaml.load(new File(fileName).newInputStream())
  
  println resource.info.summary
  println resource.examples."1st example".name
  println resource.examples."1st example".sublist."0.1"
  println resource.examples."1st example".sublist."0.1".foo
  
  class CustomResolver extends Resolver {
  
      /*
       * Do not resolve float and timestamp
       */
  
      protected void addImplicitResolvers() {
          addImplicitResolver(Tag.BOOL, BOOL, "yYnNtTfFoO");
          addImplicitResolver(Tag.INT, INT, "-+0123456789");
          addImplicitResolver(Tag.MERGE, MERGE, "&lt;");
          addImplicitResolver(Tag.NULL, NULL, "~nN\0");
          addImplicitResolver(Tag.NULL, EMPTY, null);
  
      }
  }
  </code></pre>
  
  <p>Any ideas? </p>