title: How to decode JSON with type convert from string to float64
body: <p>I need to decode a JSON string with the float number like:</p>
  
  <pre><code>{"name":"Galaxy Nexus", "price":"3460.00"}
  </code></pre>
  
  <p>I use the Golang code below:</p>
  
  <pre><code>package main
  
  import (
      "encoding/json"
      "fmt"
  )
  
  type Product struct {
      Name  string
      Price float64
  }
  
  func main() {
      s := `{"name":"Galaxy Nexus", "price":"3460.00"}`
      var pro Product
      err := json.Unmarshal([]byte(s), &amp;pro)
      if err == nil {
          fmt.Printf("%+v\n", pro)
      } else {
          fmt.Println(err)
          fmt.Printf("%+v\n", pro)
      }
  }
  </code></pre>
  
  <p>When I run it, get the result:</p>
  
  <pre><code>json: cannot unmarshal string into Go value of type float64
  {Name:Galaxy Nexus Price:0}
  </code></pre>
  
  <p>I want to know how to decode the JSON string with type convert.</p>