See JSON in a web service

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi to all,

I have .net ajax extensions, and i build a small web service with the
[ScriptService] attribute (to work with JSON).

When i execute mi asmx i see in the result XML. I thought that if i used
[ScriptService] the web service would generate JSON "language".

Are there any way to see the JSON executing directly the WebService?

Thanks a lot.
Kind Regards.
Josema.
 
Josema,

How are you accessing the web service in order to see XML? Have you
tried to access it from a JSON enabled library on the client side and it
doesn't work?

I believe that JSON requests to the server require a specific header
(the Content-Type is application/json-request I believe) which is probably
what ASP.NET is using to distinguish between JSON and your web request (as
well as determining what to return).
 
Back
Top