Take the 2-minute tour ×

I created a REST GetTime Service in WCF and the service returns JSON as the response message. Also the WebMessageBodyStyle is set to wrapped so it would have an ID associated with that data it returns. But when I use Fiddler to test my service the response string is:


As the response above the ID of the string is GetTimeResult, I'm wondering is there any way on changing that bit of test to timestamp. So it looks like this:



share|improve this question

1 Answer 1

up vote 0 down vote accepted

If you are using the DataContract/DataMember attributes in your code, you add a name (as well as some other named parameters).

[DataMember(Name = "timestamp")]
public string GetTimeResult
share|improve this answer

Your Answer


