I faced with conflict of types. It's not easy to explain, but now it's about Time
Sometimes we receive int64 from JSON API, but golang library waits string:
type ChartsFiltersTime struct {
// The end of the time range to show for all charts in the dashboard.
//If you don't specify a value for this property, the system defaults to the value for each chart's `end` property.<br>
//**Note:** The specified type for `end` is `string`,
//but the system also accepts a 64-bit signed integer that represents a time in Unix time format
//(milliseconds since the Unix epoch UTC+0)
End string `json:"end,omitempty"`
// The start of the time range to show for all charts in the dashboard.
//If you don't specify a value for this property, the system defaults to the value for each chart's `start` property.<br>
//**Note:** The specified type for `start` is `string`, but the system also accepts a 64-bit signed integer
//that represents a time in Unix time format (milliseconds since the Unix epoch UTC+0)
Start string `json:"start,omitempty"`
}
I catch exception
2019/07/12 15:33:40 Dashboard error: json: cannot unmarshal number into Go struct field ChartsFiltersTime.end of type string
2019/07/12 15:33:40 Can't fetch dashboard
exit status 1
I faced with conflict of types. It's not easy to explain, but now it's about Time Sometimes we receive
int64
from JSON API, but golang library waits string:I catch exception