go
go copied to clipboard
base64Codec: invalid input, error found in #10 byte of
This my code :
//TickerEth Charts
type TickerEth struct {
Tickers []byte `json:"ticker"`
}
//Chart Realtime
func Chart(pair string) []byte {
ticker, error := request.Get("https://indodax.com/api/ticker/" + pair)
if error != nil {
panic(error)
}
var tickers TickerEth
var json = jsoniter.ConfigCompatibleWithStandardLibrary
err := json.Unmarshal(ticker, &tickers)
if err != nil {
panic(err)
}
return tickers.Tickers
}
i'm got this error :
panic: charts.TickerEth.Tickers: base64Codec: invalid input, error found in #10 byte of ...|{"ticker":{"high":"5|..., bigger context ...|{"ticker":{"high":"5178000","low":"5005000","vol_eth":"1180.|...
I got the same issue. Does anyone know how to fix it?