I’m building an application using sencha touch 1.1 in the client side and WCF REST services in the server side. I’m facing some problems when the sencha sore syncs data, the parameter sent to update method is always null. This is the c# definition of the parameter:
namespace HomeInventory.Application.Service.Dto{
[Serializable]
[DataContract(Namespace = "http://xxxxx.xxx.org/shopinglist")]
public class DtoShopingList{
[DataMember]
public long Id { get; set; }
[DataMember]
public string CreationDate { get; set; }
[DataMember]
public string ListName { get; set; }
[DataMember]
public DtoUser User { get; set; }
[DataMember]
public DtoListItem[] Items { get; set; }
[DataMember]
public bool IsDefault { get; set; }
}
This the json posted by sencha to the server:
{"records":"[{\"Id\":0,\"ListName\":\"Default\",\"CreationDate\":\"23/01/2012\",\"IsDefault\":true,\"items\":[]}]"}
It seems to me that WCF JSON serializer is unabled to parse the JSON to the corresponding class. Any help in how to fix it?
Thanks in advance.
Well, in case it serves someone else, I got rid of the backslashes with the following settings in the proxy.
Best regards.