Otherwise with a null response you would have no result, no version, nothing..., and with an omitted response you would have no error neither...
Notes:
1 - As the spec says that the "error" menber "MUST NOT exist if there was no error triggered during invocation", adding a null "error" member in a valid response makes it a malformed JSON-RPC server response
The service is "buggy" and you should report an issue as you can be sure that some JSON-RPC client correctly support such response
2- But, as a JSON-RPC client author, because on the Web you often have no choice and can hardly fix how the server behaves, it is generally wize to follow the "robustness principle" aka the "Postel's law" who applied it to TCP
"be conservative in what you do, be liberal in what you accept from others."
Especially if you write a client with a specific server in mind
In that case, the response:
- contains a "response" member
- doesn't contain a VALID error member
So there is no much ambiguity on the expected behavior
The real problem would be if you had a "response" member and a valid "error" member
Here a again you could support a "config" that allow the code using the client implementation would choose to interpret it:
- as an error by default
- as a valid response by default
- as an error if the result is null (even if it is a valid result value)
Following such concept you can see how complex the client implementation can become (imagine how the web browser code looks like)
This is why it is interesting for coders to have multiple client implementations available:
- some very strict ones failing on such malformed response but with a light and fast code
- some more permissive, with more complex and heavy code, for when you have no much choice regarding the services you need to connect to
Anyway "ALWAYS START BY REPORTING AN ISSUE TO FIX THE SERVER"
:-)