我有一個JavaScript DTO,如下所示。什麼是結構轉換爲json對象使用params =下面給出的DTO列表應該在這裏 in objective-c ??如何在objective-c中創建JSON對象?
我如何構建基於此的JSON對象?
private List<Long> sizes=new ArrayList<Long>();
private List<Long> colors=new ArrayList<Long>();
private List<Long> styles=new ArrayList<Long>();
private List<String> gender=new ArrayList<String>();
private List<Long> brands=new ArrayList<Long>();
private Long vendor;
private String vendorName;
private Boolean isNewArrival=false;
private Boolean isSort=false;
private Boolean isSale=false;
private Boolean isNew=false;
private Boolean isVintage=false;
private Boolean isComingSoon=false;
private Long saleSize;
private Double minPrice=1.0;
private Double maxPrice=5000.0;
private Integer minSalePercentage=0;
private Integer maxSalePercentage=70;
private String socialCategory;
您的代碼例子是C#,它既不是Objective-C也不是Javascript。你嘗試了什麼?你能舉一個你試圖爲自己解決問題的例子嗎? – RyanR 2013-10-28 02:35:03