clone of https://bitbucket.org/devonit/qjsonrpc