我有第三方Web服務,我使用VB.Net檢索數據。 Web服務已經經歷了3個階段,SOAP作爲XML,然後REST作爲XML現在最終以REST作爲Json。以及將認證方法更改爲API密鑰和承載。創建類/模型,以便Json返回可以投入使用DeserializeObject
因此,我們被迫再次重新編寫所有從這些Web服務發佈並獲取數據的應用程序,更好的是,它們將很快退休所有其他方法。 所以我匆忙試圖讓我們所有的錄音完成。
一部分IM具有的把JSON成從IM能夠在代碼導航(在XML ID只是我們爲XML對象,並經過節點)
香港專業教育學院讀我要創建一個麻煩對象模型,該JSON結構以反序列化爲相匹配,但有麻煩的是模型IM .. (我不能使用Newtonsoft Json.NET要麼)
下面是將JSON返回一個命令,但它的一個陣列1 -1000每退貨訂單..
我會繼續擺弄自己,但希望一個o如果你能簡單地解釋一下我必須建立的班級來完成工作! (對不起IVE除去了大部分數據只是假定「」是一個字符串(這是大多數零點)和##是數字)
{
"outgoingOrders": {
"order": [
{
"orderType": "",
"orderSource": "",
"espOrderNo": ###,
"invoiceNumber": "",
"externalReference": "",
"date": "2017-08-23T23:51:02+0100",
"customerCompany": null,
"customerName": "",
"customerAddress1": "",
"customerAddress2": null,
"customerAddress3": null,
"customerCity": "",
"customerCounty": "",
"customerPostcode": "",
"customerCountry": "",
"customerEmail": "",
"customerTelephone": "",
"customerFax": null,
"customerReference": null,
"customerNotes": null,
"deliveryCompany": null,
"deliveryName": null,
"deliveryAddress1": null,
"deliveryAddress2": null,
"deliveryAddress3": null,
"deliveryCity": null,
"deliveryCounty": null,
"deliveryPostcode": null,
"deliveryCountry": null,
"deliveryTelephone": null,
"shippingMethod": "",
"shippingCost": ##.##,
"insurance": 0.0,
"discount": 0.0,
"voucherCode": null,
"orderTotal": ##.##,
"paymentComplete": true,
"payments": {
"payment": [
{
"paymentMethod": "",
"paymentReference": "",
"paymentNotes": null,
"paymentCCDetails": null,
"paymentGateway": null,
"payPalEmail": "",
"payPalTransactionID": "",
"payPalProtectionEligibility": true,
"amount": ##.##,
"paymentDate": "2017-08-23T00:00:00+0100",
"paymentId": #####,
"postedBatchId": 0
}
]
},
"currencyCode": "",
"sellerUsername": "",
"sellerId": #,
"courierProfileName": "",
"buyerId": "",
"orderItems": {
"item": [
{
"webProductID": "",
"stockNumber": "",
"itemNumber": "",
"productTitle": "",
"quantity": #,
"unitCost": #,
"taxRate": #,
"taxCode": null,
"unitCostIncludesTax": "",
"weight": 31000.0,
"productFolderName": "#",
"creditReason": null,
"customMessage1": null,
"customMessage2": null,
"customMessage3": null,
"locationId": ####,
"supplierId": ##,
"kitType": "",
"kitMaster": "",
"picked": false,
"backOrder": false
}
]
},
"storeId": null,
"shipToStore": null,
"orderCredits": null,
"orderStatus": "",
"flag1": "",
"flag2": null,
"courierName": "",
"courierService": " ",
"courierServiceCode": "",
"fulfilmentType": "",
"webOrderID": #####,
"shippingDate": "2017-08-24T11:16:51+0100",
"invoiceDate": "2017-08-23",
"tradeSale": false,
"courierTracking": ""
}
]
},"pageContext":{"timestamp":"2017-08-24T14:02:23+0100","hasMoreEntries":false,"pageSize":1}}
複製的Json到剪貼板,然後**編輯菜單** - > **選擇性粘貼** - > **粘貼JSON作爲類**。請閱讀[問]並參加[導覽] – Plutonix
「將Json複製到剪貼板,然後編輯菜單 - >選擇性粘貼 - >粘貼Json作爲課程」 在哪個應用程序中? 乾杯:) –