JSON-RPC

JSON-RPC is a stateless, lightweight remote procedure call protocol that uses JSON as its data format. A request is a JSON object naming a method, optionally carrying parameters, and usually carrying an id used to match the response. The server replies with a JSON object containing either a result or a structured error. The protocol is deliberately minimal and makes no assumptions about the underlying transport, so the same messages can travel over HTTP, WebSockets, raw TCP sockets, or standard input and output.

The JSON-RPC 2.0 specification, published on the jsonrpc.org site, carries an origin date of 26 March 2010, based on an earlier 2009 draft, with later editorial updates through January 2013. The 2.0 spec requires every request and response to include a jsonrpc member with the exact value “2.0”, which distinguishes it from the looser 1.0 protocol. It defines a small, precise set of error codes for cases such as parse errors, invalid requests, and unknown methods, and it supports notifications, which are requests sent without an id when the client does not expect a reply. It also allows batching, in which an array of requests is sent in a single message.

JSON-RPC is the JSON-era counterpart to XML-RPC, which Dave Winer introduced in 1998. Both share the same basic idea of encoding a method name and parameters in a structured document sent to a server, but JSON-RPC swaps XML for the far more compact JSON syntax, reflecting the broader move away from XML toward JSON in web tooling during the late 2000s. Its simplicity made it attractive for systems that needed a predictable RPC contract without the weight of SOAP or the resource-oriented conventions of REST.

The protocol found a durable home in developer tooling and infrastructure. The Language Server Protocol, which lets code editors talk to language analysis servers, uses JSON-RPC 2.0 as its message format. Many blockchain platforms, most notably Ethereum, expose node functionality through a JSON-RPC API, so wallets and applications query and submit transactions using JSON-RPC calls. The protocol also appears in numerous IoT, desktop, and microservice contexts where a small, transport-independent RPC layer is wanted.

JSON-RPC illustrates how a narrowly scoped specification can outlast more ambitious ones. By standardizing only the shape of a call and a response, and leaving transport and authentication to the surrounding system, it became a reusable building block that newer ecosystems adopted whenever they needed a clear, method-oriented contract expressed in JSON.

Sources

Last verified June 8, 2026