Feel free to clean up. I copied it from REST adapter but the routes for jsonrpc is probably different. For example, REST has a route for each of the operation while jsonrpc only needs have one per class.