go-json icon indicating copy to clipboard operation
go-json copied to clipboard

expected comma after object element

Open own2pwn opened this issue 1 year ago • 2 comments

{"timestamp":1687799181,"estimates":{"30":{"sat_per_vbyte":27.0,"total":{"p2wpkh":{"usd":1.04445045,"satoshi":3807.0},"p2sh-p2wpkh":{"usd":1.2296367,"satoshi":4482.0},"p2pkh":{"usd":1.6740836999999997,"satoshi":6102.0}}},"60":{"sat_per_vbyte":27.0,"total":{"p2wpkh":{"usd":1.04445045,"satoshi":3807.0},"p2sh-p2wpkh":{"usd":1.2296367,"satoshi":4482.0},"p2pkh":{"usd":1.6740836999999997,"satoshi":6102.0}}},"120":{"sat_per_vbyte":27.0,"total":{"p2wpkh":{"usd":1.04445045,"satoshi":3807.0},"p2sh-p2wpkh":{"usd":1.2296367,"satoshi":4482.0},"p2pkh":{"usd":1.6740836999999997,"satoshi":6102.0}}},"180":{"sat_per_vbyte":27.0,"total":{"p2wpkh":{"usd":1.04445045,"satoshi":3807.0},"p2sh-p2wpkh":{"usd":1.2296367,"satoshi":4482.0},"p2pkh":{"usd":1.6740836999999997,"satoshi":6102.0}}},"360":{"sat_per_vbyte":21.0,"total":{"p2wpkh":{"usd":0.81235035,"satoshi":2961.0},"p2sh-p2wpkh":{"usd":0.95638409999999985,"satoshi":3486.0},"p2pkh":{"usd":1.3020650999999999,"satoshi":4746.0}}},"720":{"sat_per_vbyte":17.0,"total":{"p2wpkh":{"usd":0.65761695,"satoshi":2397.0},"p2sh-p2wpkh":{"usd":0.7742157,"satoshi":2822.0},"p2pkh":{"usd":1.0540527,"satoshi":3842.0}}},"1440":{"sat_per_vbyte":16.0,"total":{"p2wpkh":{"usd":0.6189336,"satoshi":2256.0},"p2sh-p2wpkh":{"usd":0.72867359999999992,"satoshi":2656.0},"p2pkh":{"usd":0.99204959999999986,"satoshi":3616.0}}}}}

expected comma after object element. offset: 61. it seems to failing parsing the first float? 27.0

my model

type Estimate struct {
    SatPerVbyte int64                         `json:"sat_per_vbyte"`
    Total       map[string]map[string]float64 `json:"total"`
}
type Response struct {
    Estimates map[string]Estimate `json:"estimates"`
}

own2pwn avatar Jun 26 '23 17:06 own2pwn

In my own experience, the issue here is the expected type of something is wrong in the JSON blob. Checkout #389

MattDietz avatar Aug 02 '23 17:08 MattDietz

In my own experience, the issue here is the expected type of something is wrong in the JSON blob. Checkout #389

27.0 seems to me to be a valid decimal number

own2pwn avatar Aug 05 '23 19:08 own2pwn