Add jsonrpc protocol support

/to @ritch