You are working on the hyperswitch repository (Rust payment processing system).
REPOSITORY SETUP:
Repository: juspay/hyperswitch
Working directory: ./repos/hyperswitch_pool_9 (already cloned)
Base commit: aae1994ea147fa1ebdc9555f00b072bb9ed57abc
Task ID: juspay__hyperswitch-8971
Version: v1.116.0
TASK DESCRIPTION:
Bug: refactor(routing): receive json value instead of string
DETAILED CONTEXT & HINTS:
Type of Change
Bugfix
New feature
Enhancement
Refactoring
Dependency updates
Documentation
CI/CD
Description
Refactoring to recieve json response instead of string
Updated ConfigApiClient::send_decision_engine_request calls in crates/router/src/core/routing/helpers.rs to return serde_json::Value instead of String.
This ensures the response is parsed as JSON for better type safety and avoids manual string-to-JSON conversions in downstream logic.
Changes Made
Replaced generic type parameter String with serde_json::Value in the following functions:
enable_decision_engine_dynamic_routing_setup
update_decision_engine_dynamic_routing_setup
disable_decision_engine_dynamic_routing_setup
create_decision_engine_merchant
delete_decision_engine_merchant
Purpose
Switching to serde_json::Value directly improves clarity, reduces redundant parsing, and enforces better response handling.
I'll help you implement this refactoring task to change the ConfigApiClient::send_decision_engine_request calls to return serde_json::Value instead of String. Let me start by understanding the current codebase structure and locating the relevant files.
Assistant
(no content)
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.