smaxildibia
New Member
i looked up for my problem here and on google for good 4 hours. I got fixes and i used them but to no avail.So I have a .NET webservice, which has a function. I mentioned the class to be scriptservice and above the method declared responseformat as json.i set httpget and post in web.config as well. i have a Person class.I set first and lastnames for a person and return the person object as json in the function. I am calling this service on a page using javascript and it alerts the expected value in json format( looked at it in firebug,firefox). This page is just for test. In my obj c code i use the asmx directly followed by methodname. Now on my objective c side i construct a request and set it to post, application/json and give the url and use the nsdata to get the person object in JSON format. BUT i am getting it in xml. i converted the nsdata to string and printed it and i am getting it in xml. how can i get it in JSON format. Please help.Thanks.my obj -c code and the output is located here:https://www.dropbox.com/s/hawozl0glll3w1c/new%20%203.txtmy webservice file is located here;https://www.dropbox.com/s/bbwjpm3bt5bv8to/new%20%202.txt