Skip to content

0. Json RPC protocol

leonidumanskiy edited this page Sep 23, 2016 · 2 revisions

Json-RPC over Websockets server implementation

RData protocol is built on top of JSon-RPC 2.0. This is a basic example of sending data to the server:

{
    "jsonrpc": "2.0",
    "method": "authenticate",
    "params": {"userId": "USERTOKEN"},
    "id": 1
}

Where:

  • "jsonrpc" - Json RPC version, must always be "2.0"
  • "method" - RPC method to call
  • "params" - params, must be array or object
  • "id" - request id, must be unique per request.

Server will answer with the result object:

{
    "jsonrpc": "2.0",
    "result": true,
    "id": 1
}
Clone this wiki locally