Really rough first draft of JSONRPC.