refactor jsonRpc response