I need to decode a JSON string with the float number like: {"name":"Galaxy Nexus", "price":"3460.00"} I use the Golang code below: 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), &pro) if err == nil { fmt.Printf("%+v\n", pro) } else { fmt.
![How to decode JSON with type convert from string to float64](https://cdn-ak-scissors.b.st-hatena.com/image/square/98d6f053a97a87156775f60757c60865d0f2c47d/height=288;version=1;width=512/https%3A%2F%2Fcdn.sstatic.net%2FSites%2Fstackoverflow%2FImg%2Fapple-touch-icon%402.png%3Fv%3D73d79a89bded)