I have a Go HTTP client which sends/parses JSON-RPC
requests.
HTTP POST Request :
[
{"id":"1", "method":"action1","params":[]},
{"id":"2", "method":"action2","params":[]},
...
{"id":"X", "method":"actionX","params":[]}
]
HTTP response :
[
{"id":"1", "error":null, "result":{...}},
{"id":"2", "error":null, "result":{...}},
...
{"id":"X", "error":null, "result":{...}}
]
How to handle those payloads where the result
key is an object with dynamic schema depending on the value of the key id
.