title: Converting Json to string in golang
body: <p>What I am trying to do is to convert the JSON response I got from a third party API  to string to be able to render it on the webpage. My attempt first was to create a struct called <code>money</code> which holds the 3 values which are being returned and then <code>Unmarshel</code> the bytes but I don't get anything displayed</p>
  
  <p>Here is the struct</p>
  
  <pre><code>type money struct {
  Base     string  `json:"base"`
  Currency string  `json:"currency"`
  Amount   float32 `json:"amount"`}
  </code></pre>
  
  <p>and inside the <code>getCurrency()</code> func </p>
  
  <pre><code>    response, err := http.Get("https://api.coinbase.com/v2/prices/spot?currency=USD")
  
  if err != nil {
      fmt.Printf("The http requst failed with error %s \n", err)
  } else {
      answer, _ := ioutil.ReadAll(response.Body)
      response := money{}
      json.Unmarshal([]byte(answer), &amp;response)
      fmt.Fprintln(w, response)
      fmt.Fprintln(w, response.Currency)
  
  
  }
  </code></pre>
  
  <p>Finally here is what i get from the json response</p>
  
  <pre><code> {"data":{"base":"BTC","currency":"USD","amount":"4225.87"}}
  </code></pre>