I am struct in one of the scenarios and want the best solution. My problem statement is :
I want to call the same POST rest service /test/abc with payload
{
"emaid"="US12345"
}
or {
"emaId"="US12345"
}
with a small change in variable name emaid as "I and i" small and caps case.
while trying with my approach I am getting exception as:
{"status_code": 2002, "status_message": "Unknown property emaId while deserializing XYZObject{firstName='asd', lastName='asds', email='asdsa@asd.com', mobile='526487', address1='qwewq', address2='wqwewqewq', city='San jose', emaid='null', emaidType='null'}", "timestamp": "2020-01-29T05:41:31Z" }
with the payload containing
{
.....
"emaId" : "US1234", --- I want both to work with single rest service please Explain
.....
}
as JSON.
Please help me. Thanks in advance.