e01.org

JSON-RPC

JSON-RPC (JavaScript Object Notation-Remote Procedure Call) is a JSON-based wire protocol for remote procedure calls (RPC). It is similar to the XML-RPC protocol, defining only a few data types and commands. JSON-RPC allows for notifications (data sent to the server that does not require a response) and for multiple calls to be sent to the server which may be answered asynchronously. The JSON-RPC protocol is transport-independent and can be carried over many different data transport protocols, including file descriptor I/O, HTTP and TCP. It does not directly provide any support for authentication or authorization. Source: e01 Encyclopedia. Licence: CC BY-SA 4.0.

JSON-RPC (JavaScript Object Notation-Remote Procedure Call) is a JSON-based wire protocol for remote procedure calls (RPC). It is similar to the XML-RPC protocol, defining only a few data types and commands. JSON-RPC allows for notifications (data sent to the server that does not require a response) and for multiple calls to be sent to the server which may be answered asynchronously. The JSON-RPC protocol is transport-independent and can be carried over many different data transport protocols, including file descriptor I/O, HTTP and TCP. It does not directly provide any support for authentication or authorization. --> {"jsonrpc": "2.0", "method": "subtract", "params": {"minuend": 42, "subtrahend": 23}, "id": 3} Notification (no response, and no id): --> {"jsonrpc": "2.0", "method": "update", "params": [1,2,3,4,5]} Parse error: --> {"jsonrpc": "2.0", "method": "subtract", "params": Invalid Request: --> {"jsonrpc": "2.0", "method": 1, "params": "bar"} Method not found: --> {"jsonrpc": "2.0", "method": "foobar", "id": 1} Invalid params: --> {"jsonrpc": "2.0", "method": "subtract", "params": {"minuend": 42}, "id": 2} Internal error: --> {"jsonrpc": "2.0", "method": "getData", "params": [], "id": 4} Batch request with errors: --> [ {"jsonrpc": "2.0", "method": "subtract", "params": [42, 23], "id": 1}, {"jsonrpc": "2.0", "method": "foobar", "id": 2}, {"foo": "bar"} ] --> {"version": "1.1", "method": "confirmFruitPurchase", "params": [["apple", "orange", "mangoes"], 1.123], "id": "194521489"} --> {"method": "echo", "params": ["Hello JSON-RPC"], "id": 1}

source: e01 Encyclopedia · licence: CC BY-SA 4.0 · page · source revision

Cite this

"JSON-RPC". 1782481948. e01 Encyclopedia. CC BY-SA 4.0. https://en.wikipedia.org/w/index.php?oldid=1361233880

JSON record · API collection · BibTeX · RIS · CSL-JSON · citation policy

Save to pass ·