I have a valid JSON, which I don't know how to parse in json.Unmarshal (golang):
{
"method": "notice",
"params": [0, [{
"previous": "12345",
"timestamp": "2017-12-12T05:49:09",
"witness": "12345",
"transaction_merkle_root": "ffff",
"extensions": [],
"witness_signature": "12345"
}]]
}
All I can do is:
type MyJSON struct {
Method string `json:"method"`
Params []interface{} `json:"params"`
}
I will be really thankful if somebody help me to write correct MyJSON type to parse all other fields through golang's json.Unmarshal. It's way too complex to me :(