Click here to Skip to main content
14,825,162 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi all,

Is there any way to accept JSON as parameter in Web service ?
how can i find any example link ?
really appreciate your help

Best Rgds,
dartfrog
Posted
Comments
Zoltán Zörgő 15-Oct-12 4:37am
   
You want to make an ajax enabled web service?

Asmx services dont work with json. If you want to make something like this with asmx not json enabled wcf service then encode your json as get or post parameter and deserialize it by yourself to object in code behind of service.

However I recomend to you just use it wcf service for that insted.
   
Comments
dartfrog 15-Oct-12 5:19am
   
Hi, thanks for your time,
i want to send string array to asmx web service from IOS application.
if possible i don't want to use WCF service unless i study WCF.
Is there any other way to accept string array parameter in Web Service ?
again thanks you.
n.podbielski 15-Oct-12 6:14am
   
I you add the same parameter multiple times with diffrent values you will get on server string with this values separated with comma. Just split this string and you will get array.

Or just build this string yourself in some custom format. Either way it's dirty-hacky solution.
dartfrog 15-Oct-12 9:41am
   
Ok .. I try to use WCF. Thanks for your suggestion.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900