Hi guys, Do any of you know and have the time to go through a detailed explanation of a JSON web service? I'm just playing around with this to learn more. Current situation is this. I have a web service set up on DASP which is just returning a string. The string in this case is an <img src.... string, pointing the src to an image also held on DASP. Wanted something visual to output so it's clear if it's working right. The web service is called from a completely different domain (lets call it domainx) through the use of dynamic script tags. The web service appears to work, and I only say appears due to my limited knowledge, as a script element is built on domainx with some code inside it. Using Firebug through Firefox I can see that the code written within the script is as follows; <string xmlns="http://tempuri.org/">{"imageStr":"&lt;img src='http://www.domainx.com/images/1.gif' /&gt;"}</string> (This output also appears when I call the webservice directly in a browser and invoke it.) When it renders, the callback function appears not to be called. Probably due to the fact that a javascript error is raised, saying that there's a missing ; at the xmlns point in the string. So first question please. Is this JSON output? The xml tag confuses me as, well, it seems to indicate xml output. I can provide plenty more code and info as I've googled this to bits and I'm still non the wiser. So is it my webservice which is providing the wrong output? Is it a setting in the web.config file? Is it a problem on domainx with parsing the json output? Some insight please.....................!!! Cheers, Stu.
Thanks wisemx, these look really promising. Guess I didn't Google hard enough to find them!! It's just great to have a good community like this as a very strong backup. Pushed for time the next few nights but hopefully get my teeth into it at the weekend (where did my life go?) and I'll post back what happens. Thanks again for taking the time to post. Cheers, Stu
Glad they provided some help. My Google Coop is much better than my memory for things like that: http://www.google.com/coop/cse?cx=009244845836111659857%3Albvxsjj8mho The URL above combs a tons of ASP.NET resources, quickly. Salute, Mark Note: "wisemx" is my old network name at Siemens, it just stuck.
Fritz did a great article for MSDN last year that should be of great help: http://msdn2.microsoft.com/en-us/magazine/cc163499.aspx Another great resource here: http://aspalliance.com/1168_Introducing_JSON
Hi there I am trying to do something similar using WCF, JSON and Jquery. I have a thread open here http://community.discountasp.net/default.aspx?f=33&m=27724 I would appreciate if you could please share your expertise so I can get the service up and running. Many thanks!