title: Converting YAML to JSON with Python: <block end> found
body: <p>I'm trying to convert the following example <code>yaml</code> file into <code>json</code></p>
  
  <p><strong>test.yaml</strong></p>
  
  <pre><code>- fields: {name: "Test", nr: "000"}
      model: testmodel
      pk: "1"
  </code></pre>
  
  <p>However, calling </p>
  
  <pre><code>python -c 'import sys, yaml, json; json.dump(yaml.load(sys.stdin), 
  sys.stdout, indent=4)' &lt; test.yaml &gt; test.json
  </code></pre>
  
  <p>returns an error</p>
  
  <pre><code>"expected &lt;block end&gt;, but found %r" % token.id, token.start_mark)
  yaml.parser.ParserError: while parsing a block mapping
    in "&lt;stdin&gt;", line 1, column 3
  expected &lt;block end&gt;, but found '&lt;block mapping start&gt;'
    in "&lt;stdin&gt;", line 3, column 5
  </code></pre>
  
  <p>What's wrong with my yaml-file?</p>