golang/go

net/rpc/jsonrpc: client implementation is not compatible with JSON-RPC 1.0 spec

Open

#30 188 ouverte le 12 févr. 2019

Voir sur GitHub
 (8 commentaires) (1 réaction) (0 assignés)Go (19 008 forks)batch import
NeedsInvestigationhelp wanted

Métriques du dépôt

Stars
 (133 883 stars)
Métriques de merge PR
 (Aucune PR mergée en 30 j)

Description

According to JSON-RPC 1.0 specification the params property should be an array of object. The canonical example of calling remote methods with JSON-RPC 1.0 is to send the parameters as one dimensional JSON array: {"method": "concat", "params": ["foo", "bar"], "id": 123} The GO's client implementation will always wrap the params property in an additional array: {"method": "concat", "params": [["foo", "bar"]], "id": 123} This works fine as long as both ends use the GO's implementation and expect the actual params to be the first element of the params array. It becomes a problem if you have another server implementation of JSON-RPC 1.0 but want to use GO's client to call remote methods.

I have worked around this issue locally by fixing it in my go fork.

Guide contributeur