I have an Api with Response:
{
"FullName":"Jon Black Kenedy",
"EmployeeCode":"JBK0001",
"Age":23,
"CompanyCode":"RTA Shipter",
"Orders":[
{
"ItemName":"meat",
"Price":"$2000",
"Quality":3,
"Unit":"Peach"
},
{
"ItemName":"Fruit",
"Price":"$800",
"Quality":60,
"Unit":"Block"
}
]
}
And I want to custom my response by middware (with custom configuration) to change my response to:
{
"Customer_FullName":"Jon Black Kenedy",
"Customer_Code":"JBK0001",
"Request":[
{
"RequestItem":"meat",
"Quality":3
},
{
"RequestName":"Fruit",
"Quality":60
}
]
}
Content of Configuration File:
FullName-->Customer_FullName,
EmployeeCode-->Customer_Code,
Request[
ItemName-->RequestItem,
Quality-->Quality
]
Please help me to resolve my problem. Thanks for all.
What I have tried:
I tried build my Custom Middware, but Api Response must be a class. What can i do now.