I have written WebApi filter to detect concurrency issues. In action OnActionExecuted I set response content like below:

actionExecutedContext.Response.Content = new System.Net.Http.StringContent( "'{ \"hasValidationErrors\": true, \"validationErrors\": " + System.Web.Helpers.Json.Encode( validationErrors ) + ", \"concurrencyIssue\": true }'", System.Text.Encoding.UTF8, "application/string" );
When I receive it and write to console it looks like on below printscreen
Then, When I try to do:
JSON.parse(response.data)
I get error:
SyntaxError: Unexpected token ' in JSON at position 0
but when I do
JSON.parse( response.data.substring(1, response.data.length - 1) )
it works as expected, mean convert string to json data.
So my question is, why I have to truncate response.data?
I gues that, as can be seen in first line on printscreen, there are additional quotemarks. But how can I create my server response to not put them there? And why, when I log response.data ( thrid line on printscreen ), there are only apostrophe, but no quotemarks?