JSON-RPC

Uses your system voice; voice and rate in settings.

Snapshot

≈ 3 min read

Names in other languages

No names in other languages are held for this entry yet.

Article bodies are English and are not machine-translated. A name in another language is not a translation of the article.

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.

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}

Text derived from https://en.wikipedia.org/w/index.php?oldid=1361233880 under CC BY-SA 4.0; modifications have been made.

Sources cited in this revision

3 named source(s) extracted from the cited revision. A source with no author is shown by its publication; nothing is invented.