Toying with JSON-RPC today, and turns out there's already an elisp library! https://github.com/skeeto/elisp-json-rpc MELPA is wonderful for code reuse.