-2
數組反序列化JSON有一個Web服務,返回一些JSON是這樣的:與項目
{
"ContainerCount": 36,
"ContainerUnits": "",
"Items": [
{
"Id": "GBR|PR|52484481|0|0|0",
"Text": "Google UK Ltd, 1 St. Giles High Street, London, WC2H...",
"Highlight": "",
"Cursor": 0,
"Description": "",
"Next": "Retrieve"
},
{
"Id": "GBR|PR|52484493|0|0|0",
"Text": "Google UK Ltd, Colonnade Walk, 123 Buckingham Palace Road, London, SW1W...",
"Highlight": "",
"Cursor": 0,
"Description": "",
"Next": "Retrieve"
},
{
"Id": "GBR|PR|28329353|0|0|0",
"Text": "Google UK Ltd, Belgrave House, 76 Buckingham Palace Road, London, SW1W...",
"Highlight": "",
"Cursor": 0,
"Description": "",
"Next": "Retrieve"
},
{
"Id": "GBR|PR|52844784|0|0|0",
"Text": "Google UK Ltd, 7 Pancras Square, London, N1C...",
"Highlight": "",
"Cursor": 0,
"Description": "",
"Next": "Retrieve"
},
{
"Id": "GBR|PR|50573331|0|0|0",
"Text": "Google, Peter House, Oxford Street, Manchester, M1...",
"Highlight": "",
"Cursor": 0,
"Description": "",
"Next": "Retrieve"
},
{
"Id": "GBR|PR|12492688|0|0|0",
"Text": "Johnny Goggles, 32 North John Street, Liverpool, L2...",
"Highlight": "",
"Cursor": 0,
"Description": "",
"Next": "Retrieve"
},
{
"Id": "GBR|PR|12682667|0|0|0",
"Text": "Jonny Goggles, 274 Stanley Road, Bootle, L20...",
"Highlight": "",
"Cursor": 0,
"Description": "",
"Next": "Retrieve"
}
]
}
我完全不知道如何反序列化JSON這個。
最終目標是在組合框中顯示元素的文本,然後使用組合框選擇的元素的「ID」進一步查詢。
是你想要哪個解串器使用?你有嘗試過什麼嗎? – Plutonix
感謝您將代碼放入代碼塊。 json.net。我不確定如何組織課程。 –