If its a third party web service, how will I know if it returns data in XML or JSON format? I guess if its created in .NET, then I just look at the WSDL provided for the web service?
¿Es eso correcto?
preguntado el 03 de julio de 12 a las 04:07
You can always look at the HTTP headers in the response, in particular the content type. There's no guarantee they are correct, but the presence of "application/json" or "application/xml" should give you a clue.
However, knowing that the response is XML or JSON isn't going to help you much. If you don't know what the web service returns, and it returns
<akhegc snt="jsg"/>, then knowing this is XML doesn't actually help you make sense of it.