title: Marshaling a nested map into JSON
body: <p>I'm trying to marshal this nested map into a JSON string.</p>
  
  <pre><code>map[
    description:Foo Bar
    url:http://foobar.co.uk
    theme_color:#1b1b1b
    markdown:kramdown
    sass:map[
      style:compressed
    ]
    collections:map[
      projects:map[
        output:true
        permalink:/project/:path
      ]
      jobs:map[
        output:true
        permalink:/job/:path
      ]
    ]
    title:Foo Bar
    email:foo@foobarco.uk
  ]
  </code></pre>
  
  <p>(Cleaned up output from <code>fmt.Printf("%v", m)</code>)</p>
  
  <p>Initially a config file is read and parsed to produce the map, so I don't know the fields in advance, meaning I can't(?) use a struct.</p>
  
  <p>Unmarshalling from YAML into this map of <code>map[string]interface{}</code> works fine, but when I pass this map to <code>json.Marshal</code>, I get the following error.</p>
  
  <pre><code>json: unsupported type: map[interface {}]interface{}
  </code></pre>
  
  <p>From reading around, I can see that this error is thrown because JSON only supports string keys. What's confusing me, is that the map above doesn't seem to have any non-string keys.</p>
  
  <p>If I remove the nested <code>sass</code> and <code>collections</code> keys, it marshals without any issues.</p>
  
  <p>Is it possible to do some sanity check on the map to confirm that all the keys are infact <code>string</code> and not just <code>interface{}</code> looking like strings?</p>