Server-side code for handling JSON-RPC requests.