Added support for JSON-RPC