0

{"OFFERS":[{"OFFER_ID":"490","OFFER_IMAGE":"http://www.discountbox.in/DiscountBoxUpload/19007012.JPG","OFFER":"クリアランス在庫"},{"OFFER_ID ":"488","OFFER_IMAGE":"http://www.discountbox.in/DiscountBoxUpload/36911135.JPG","OFFER":"最大 20% オフ"},{"OFFER_ID":"487"," OFFER_IMAGE":"http://www.discountbox.in/DiscountBoxUpload/19373615.JPG","OFFER":"最大 40% オフ"},{"OFFER_ID":"486","OFFER_IMAGE":"http:/ /www.discountbox.in/DiscountBoxUpload/16587130.JPG","OFFER":"特別割引"},{"OFFER_ID":"485","OFFER_IMAGE":"http://www.discountbox.in/DiscountBoxUpload/ 56376547.JPG","OFFER":"最大 10% オフ"},{"OFFER_ID":"484","OFFER_IMAGE":"http://www.discountbox.in/DiscountBoxUpload/20302235.JPG","OFFER":"無料アイテスト中"},{"OFFER_ID":"483","OFFER_IMAGE":"http://www.discountbox.in/DiscountBoxUpload/14323344.JPG","OFFER":"最高のスペシャル ラ"},{"OFFER_ID" :"482","OFFER_IMAGE":"http://www.discountbox.in/DiscountBoxUpload/19790443.JPG","OFFER":"一律 10% オフ"},{"OFFER_ID":"481","OFFER_IMAGE ":"http://www.discountbox.in/DiscountBoxUpload/13783976.JPG","OFFER":"一律 20% オフ "},{"OFFER_ID":"480","OFFER_IMAGE":"http:// www.discountbox.in/DiscountBoxUpload/77105375.jpg","OFFER":"一律 20% オフ"},{"OFFER_ID":"479","OFFER_IMAGE":"http://www.discountbox.in/DiscountBoxUpload/91484956.jpg ","OFFER":"最大 50% オフ"},{"OFFER_ID":"478","OFFER_IMAGE":"http://www.discountbox.in/DiscountBoxUpload/25738727.jpg","OFFER":"バンパー ダマカ"}]}

異なる変数に格納された OfferID、Image、および Offer としてデータを取得する必要があります。Visual Studio 2010 Express for Windows Phone でそれを行う方法はありますか?助けてください。前もって感謝します

4

1 に答える 1

0

http://json2csharp.com/を使用して、逆シリアル化するクラスを作成します。

public class OFFER
{
    public string OFFER_ID { get; set; }
    public string OFFER_IMAGE { get; set; }
    public string OFFER { get; set; }
}

public class OfferResponse
{
    public List<OFFER> OFFERS { get; set; }
}

次に、Json.NETを使用します。

var deserializedProduct = JsonConvert.DeserializeObject<OfferResponse>(json);
于 2012-04-04T20:15:06.890 に答える