iphone - Post array of object to WCF Rest service using JSON? -
need send complex object having nested ilist iphone in json format wcf rest service. complex object defined following:
public class batchdata { long batchid; list<account> accounts; list<contacts> contacts; }
please let me know client side (iphone) syntax create required json request , server side post method implementation handle such scenario ?
thanks in advance.
for server side: define operation contract takes array of type. search examples on wcf rest services (you'll need use [webinvoke]
attribute define operation) , you'll find how it.
for client side: can send request using nsurlrequest class. , create appropriate json, can @ nsjsonserialization class, convert between arrays (nsarray) , dictionaries (nsdictionary) , json need send service.
Comments
Post a Comment