我已经在另一个团队开发的 Web 服务中拥有了这些类对象的结构。我需要将 JSON 数据发布到 class CartObject (int CustomerID, List<CartListObject> CartList)
。
这里里面的元素CartListObject
:
public int ItemID { set; get; }
public ItemObject Item { set; get; }
public int Quantity { set; get; }
项目对象:
public int ID { set; get; }
public string Name { set; get; }
public List<ItemImageObject> ItemGallery { set; get; }
项目图像对象:
public int ItemID { set; get; }
public string ImageName { set; get; }
我不知道应该如何将 JSON 数据CartObject
发布到 Web 服务。
任何想法都值得赞赏。