0
客戶端請求很好,但服務器響應很糟糕。客戶端是否應答服務器的響應無效?JSON-RPC應該在返回錯誤時返回錯誤嗎?
如果反過來是真的(即服務器請求很好,客戶端請求不好),應該採取相同的方法嗎?
應該包含請求標識符嗎?
--> {"jsonrpc": "2.0", "method": "subtract", "params": {"subtrahend": 23, "minuend": 42}, "id": 3}
<-- {"jsonrpc": "2.0", "id": 3} /* Note that results property is missing */
--> {"jsonrpc": "2.0", "error": {"code": -123, "message": "Results property is missing"}}