Use JSON for RPC and handle RPC server disconnects.