如何使用`this解析C#(Windows Phone)中的JSONData。

问题描述 投票:-1回答:1

在Windows Phone应用中。我正在通过(get,set)方法解析JSON数据我从this URL

获得了处理JSON数据的另一种方法

在此站点的一部分(http://www.dfg-team.com/json-feeds-on-windows-phone/?lang=en)使用两种技术来解析json数据。]

因为我想使用this.关键字来处理JSON数据..

但是我的应用程序的数据包含大量的Json数据,其中包含许多JSON数组和JSON对象。但这不是问题,因为我有一个主要问题是我的json包含json对象内的Json数组或json数组内的json对象,因此在这里我们遇到了问题。

这是我想解析这些字段的我的JSon数据。使用this.方法

{
"returnCode": "success",
"SData": {
    "results": [
        {
            "wdetails": [
                {
                    "noffers": [],
                    "offers_count": 0,
                    "name": "yahoo.com",
                    "recentoffers_count": 0,
                    "sku": "30072826",
                    "url": "http://www.yahoo.com"
                },
                {
                    "noffers": [
                        {
                            "id": "3aggEYoyaso",
                            "price": "179.99",
                            "firstrecorded_at": 13700,
                            "lastrecorded_at": 13700,
                            "seller": "google",
                            "availability": "In stock, ships same Business Day.",
                            "currency": "USD"
                        }
                    ],
                    "offers_count": 1,
                    "name": "frys.com",
                    "recentoffers_count": 1,
                    "sku": "789",
                    "url": "http://www.google.com"
                },
                {
                    "listprice_currency": "USD",
                    "noffers": [
                        {
                            "id": "2SlCKQKm",
                            "price": "192.37",
                            "firstrecorded_at": 111,
                            "lastrecorded_at": 111,
                            "seller": "Amazon",
                            "availability": "13 In Stock",
                            "currency": "USD"
                        }
                    ],
                    "offers_count": 1,
                    "name": "amazon.com",
                    "listprice": "288.56",
                    "recentoffers_count": 1,
                    "sku": "1084089",
                    "url": "http://www.amazon.com"
                }
            ],
            "model": "GGGG",
            "weight": "771107.03",
            "price_currency": "USD",
            "gtins": [
                "00839294"
            ],
            "mpn": "GGGG",
            "cat_id": "25552",
            "height": "98.81",
            "features": {
                "Product Type - General": "Tablet",
                "Height (in.)": "1.70"
            },
            "length": "416.56",
            "geo": [
                "usa"
            ],
            "width": "267.97",
            "category": "Tablets",
            "price": "179.99",
            "updated_at": 138,
            "color": "Black",
            "manufacturer": "google",
            "images_total": 1,
            "images": [
                "https://evbdn.eventbrite.com/s3-s3/eventlogos/1832816/google.png"
            ],
            "brand": "Dell",
            "offers_total": 180
        }
    ],
    "total_results_count": 1,
    "results_count": 1,
    "code": "OK",
    "offset": 0
  }
  }

我想使用C#中的this.对此进行解析。

在Android中,我通过hash map方法完成了此操作,在Windows Phone this.中类似于哈希映射,所以我正在使用它。

在Windows Phone App中。我正在通过(get,set)方法解析JSON数据,我从该URL获得了处理JSON数据的另一种方法。在本网站的部分(http://www.dfg-team.com/ json-feeds-on-windows-phone / ...

c# parsing windows-phone-8
1个回答
1
投票

我正在编辑我以前的答案:-

© www.soinside.com 2019 - 2024. All rights reserved.