I have been reading lot of posts on retrieving/returning json objects in a WCF method. Correct me if I am wrong: Adding an endpoint and WebHTTp behavior in the config in addition to WebInvoke before a service method enables json objects to be returned by a service method.
The use of webinvoke makes the method very specific to a certain format (json here). The issue is I already have a WCF SOAP service and I want to reuse the service methods to be able to return both XML or JSON objects. Is there a way to make the methods generic and change the response format based on the endpoints used or the platforms used to access my service method?