The problem of json coding in golang

type F struct {
    Amount float64 `json:"amount"`
}

func main() {
    amount := F{9.426453e+06}
    body, err := json.Marshal(amount)  // gojson
    fmt.Println(string(body), err)   // {"amount":9426453} 
}

this json comes out to eliminate the parameters after the decimal point. Ask for advice from God?

Jun.26,2021
Doesn't the number

denote the sixth power of
9.426453x 10? Isn't it right for
to show
9426453
.


this issue has been studied a long time ago, and the reasons for this can be found in these two articles, as well as some of the pitfalls dealt with by golang json.
https://stackoverflow.com/que.
https://ethancai.github.io/20.

the first answer to the solution stackoverfow is fine.
in fact, customizing MarshalJSON is very useful, and you can implement many of the marshal formats you want.

Menu