I just wanted to know if there is a way I could prevent ASP.net Web API controller from converting json string from the requests body into an object, I just want it as is.
for example:
public HttpResponseMessage PostJson(int id, [FromBody] string jsonString)
{
// code processing here
}
The above code accepts two parameters for id and a json string which should be posted along with the body of the request. When the method accepts the post request it will mapped the value of the id, but not with the jsonString because as with its default behavior it will convert it into an object.
Is there a way to ignore it? Thanks in advance.