Please review my commit which fixing the following situation: script is crashing in case of pequest->params is missing.
fixing empty params error
registry support for stateless services
response type fixed
Why do you want this change? Wouldn't it be just as easy to pass in  where required instead of undefined?
This 'undefined' is provided by rfc4627_jsonrpc_http:parse_jsonrpc/5 when no params are specified in POST request:
We may fix it there then.
Hmm, interesting. Reading the 1.1 JSON-RPC spec, it's hard to know what to do. So first off, I think you're right to fix it in rfc4627_jsonrpc_http:parse_jsonrpc/5, but the question then becomes: what should be done? My guess is that absent parameters should be treated like , exactly as you suggested in this commit. The spec says that params is optional, but then says that if it has a value other than an array or object, the server must reject the request with an error, which seems a bit contradictory.
Let's then support parameterless invocations. Fixed in mrspark/erlang-rfc4627@0080fdd
By the way, thank you for the changes! Most appreciated. I've merged the last two from this list; if you'd like to argue for the first one ("fixing empty params error"), please open another pull request with it. Thanks again.