I have a http invokable wcf service method;
[WebInvoke(Method = "GET", ResponseFormat = WebMessageFormat.Json,
BodyStyle = WebMessageBodyStyle.Bare, UriTemplate = "/CheckHMAC/{hMac}")]
public string CheckId(string Id)
{
Result result = new Result() { OTP = 1, IsSuccessful = false, CustomerId = "" };
return JsonConvert.SerializeObject(result);
}
This method produces an output like;
"{\"IsSuccessful\":false,\"OTP\":1,\"CustomerId\":\"\"}"
The client which uses this method complains this format since it is not valid, i ve tested it with another client and yes it seems not valid. Until now, i have never had a problem like this, the output should be easily deserialized, why json object wrapped with double quotes? How can i get a valid json string?
{"IsSuccessful":false,"OTP":1,"CustomerId":""}