J
Jo Swa(K.P.Elayaraja)-MCP
Guest
Hi every one,
Blow is my code working fine in framework code and I need to do the same in dotnet core. I tried and unable to get any luck. Hope some one may knw this and pls reply as soon as possible.
public ActionResult getsample(String obj)
{
//...
//...
// etc..
if (headerValues == "application/json")
{
return Content(HttpStatusCode.OK, resultObject, new JsonMediaTypeFormatter { SerializerSettings = { NullValueHandling = NullValueHandling.Ignore } });
}
else
return Content(HttpStatusCode.OK, resultObject, Configuration.Formatters.XmlFormatter);
}
Thanks
JoSwa
If a post answers your question, please click "Mark As Answer" on that post and "Mark as Helpful" Best Online Journal
Continue reading...
Blow is my code working fine in framework code and I need to do the same in dotnet core. I tried and unable to get any luck. Hope some one may knw this and pls reply as soon as possible.
public ActionResult getsample(String obj)
{
//...
//...
// etc..
if (headerValues == "application/json")
{
return Content(HttpStatusCode.OK, resultObject, new JsonMediaTypeFormatter { SerializerSettings = { NullValueHandling = NullValueHandling.Ignore } });
}
else
return Content(HttpStatusCode.OK, resultObject, Configuration.Formatters.XmlFormatter);
}
Thanks
JoSwa
If a post answers your question, please click "Mark As Answer" on that post and "Mark as Helpful" Best Online Journal
Continue reading...