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 Objective-C code I use the \[code\]asmx\[/code\] directly followed by \[code\]methodname\[/code\]. Now on my Objective-C side I construct a request and set it to \[code\]POST\[/code\], \[code\]application/json\[/code\] and give the url and use the \[code\]NSData\[/code\] to get the person object in JSON format. But I am getting it in xml. I converted the \[code\]NSData\[/code\] to \[code\]NSString\[/code\] and printed it; and I am getting it in xml.How can i get it in JSON format? Please help. Thanks.My Objective-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