I have a WEB API that returns null data sometimes. I am expecting the below format as response
{"cardResponse" : null}
but I am getting {} as response. Any Idea?
My method Definition looks like:
public HttpResponseMessage Opeation(string input1, [FromUri] input2 request)
The return statement looks like :
return Request.CreateResponse(HttpStatusCode.OK, response);
Response Class Structure:
public class RootResponse {
public CardResponse cardResponse{ get; set; }
}
Public class CardResponse {
public string CardName { get ; set;}
}
response?responsein the last snippet? Show the code around that line