title: Golang use json in template directly
body: <p>I'm looking for a way of binding json data directly into a template (without any struct representation in golang) - and I'm coming up short.   Essentially, what I want is to have both template document and json to be just arbitrary data - and my handleFunc to essentially be:</p>
  
  <pre><code>func handler(writer http.ResponseWriter, request *http.Request) {
      t, _ := template.ParseFiles( "someTemplate.html" )
      rawJson, _ := ioutil.ReadFile( "someData.json" )
  
      // here's where I need help
      somethingTemplateUnderstands := ????( rawJson )
  
      t.Execute( writer, somethingTemplateUnderstands )
  }
  </code></pre>
  
  <p>I've tried json.Unmarshal, but it seems to want a type.   The main thing is, in the actual program both the json and the template come from the database and are completely changeable at runtime, (and there are lots of different ones) so I can't encode any structure in the go program itself.   And obviously, I want to be able to make data like:</p>
  
  <pre><code>{ "something" : { "a" : "whatever" }}
  </code></pre>
  
  <p>and then a template like</p>
  
  <pre><code>&lt;html&gt;&lt;body&gt;
      the value is {{ .something.a }}
  &lt;/body&gt;&lt;/html&gt;
  </code></pre>
  
  <p>Is this possible with the go http.template library, or do I need to go off to Node (or find another templating library?)</p>