I am using below Code for WCF Rest Services to get in JSON format
[OperationContract]
[WebGet(UriTemplate = \"/GetOrderList?request={request}\", BodyStyl
If you were using .NET 4.0 or 4.5, then it would be simple - either use the automatic format selection as suggested by Vibin Kesavan, or within the operation set the WebOperationContext.Current.OutgoingResponse.Format to either JSON or XML depending on some of your logic.
For 3.5, you need to do most of the work. This post has an implementation exactly of this scenario. You need to create a custom dispatch message formatter implementation which (likely) wraps two formatters, one for JSON and one for XML. And when serializing the response, decide which formatter to use based on your logic.