I want to return a json object from the wep api actionfilter. How can I achieve this?
I can return the object from action but I need to return some data from the actionf
you can use HttpResponseMessage to create the response like that
var output = new Result() { Status = Status.Error.ToString(), Data = null, Message = arr };
actionContext.Response = new HttpResponseMessage {
Content = new StringContent(JsonConvert.SerializeObject(output), Encoding.UTF8, "application/json"),
StatusCode = HttpStatusCode.OK
};