Author: Backslider | Posted on: 5/29/2007 12:03:42 PM | Views : 575

I have an ASP.Net web service that I want to return a JSON response.  The method that I am working on in particular calls another web service that already gives me a JSON response.  All I want to do is return that to the caller of my webservice (it will be a .htm/.js caller).  
I have already found a way to make it work, but it doesn't seem optimal.  If I define some local objects in my web service that look like the JSON response I get from the third party web service, I can deserialize the response into my local objects, and return the object from my web service.  If I call the service from the browser with the JSON request type, I get back the correct JSON response.  But in this case I have taken a JSON string, converted it to an object and back again, which seems like too much work. Plus, I'll have an extra layer of objects that have to be kept in sync with the third party response.

If I just return the JSON that I get from ...

Go to the complete details ...