mholt / json-to-go

Translates JSON into a Go type in your browser instantly (original)
https://mholt.github.io/json-to-go/
MIT License
4.51k stars 475 forks source link

it not working now #91

Closed huahuayu closed 3 years ago

huahuayu commented 3 years ago

below json can't be transform

{
"code": 200,
"data": {
"rapid": 93000000000,
"fast": 87000000000,
"standard": 85000000000,
"slow": 82000000000,
"timestamp": 1615362329122
}
}
mholt commented 3 years ago

Works for me:

type Autogenerated struct {
    Code int `json:"code"`
    Data struct {
        Rapid     int64 `json:"rapid"`
        Fast      int64 `json:"fast"`
        Standard  int64 `json:"standard"`
        Slow      int64 `json:"slow"`
        Timestamp int64 `json:"timestamp"`
    } `json:"data"`
}