我有 JSON 字符串/响应,我需要简单解析它并获取对象/数组,它可以重复,所以我需要逐个列表获取,实际上我不知道该怎么做,因为很多解析器和所有示例简单的 JSON-es,但我的有点困难,我需要在其中导航。这是我的 JSON 示例
{
"HotelListResponse": {
"customerSessionId": "0ABAAA83-04C7-5B91-40A2-754D7299476C",
"numberOfRoomsRequested": 1,
"moreResultsAvailable": true,
"cacheKey": "-4804c75b:140a754d729:4da2",
"cacheLocation": "10.186.170.131:7300",
"HotelList": {
"@activePropertyCount": "1157",
"@size": "1",
"HotelSummary": {
"@order": "0",
"hotelId": 403147,
"name": "Justabed - Hostel",
"address1": "38 avenue augustin dumont",
"city": "Malakoff",
"postalCode": 92240,
"countryCode": "FR",
"airportCode": " ",
"supplierType": "E",
"propertyCategory": 5,
"hotelRating": 0,
"confidenceRating": 52,
"amenityMask": 8,
"tripAdvisorRating": 1.5,
"locationDescription": "Near Paris Expo Porte de Versailles",
"shortDescription": "<p><b>Property Location</b> <br />With a stay at Justabed in Vanves, you'll be close to Stade de la Plaine and Eiffel Tower.<br/> This hostel is within close proximity of Georges Brassens Park and",
"highRate": 24.87,
"lowRate": 24.87,
"rateCurrencyCode": "EUR",
"latitude": 48.81804,
"longitude": 2.30196,
"proximityDistance": 2.5680416,
"proximityUnit": "MI",
"hotelInDestination": true,
"thumbNailUrl": "/hotels/5000000/4850000/4849100/4849100/4849100_7_t.jpg",
"deepLink": "http://travel.ian.com/index.jsp?pageName=hotAvail&cid=55505&hotelID=403147&mode=2&numberOfRooms=1&room-0-adult-total=1&room-0-child-total=0&arrivalMonth=8&arrivalDay=18&departureMonth=8&departureDay=21&showInfo=true&locale=en_US&currencyCode=EUR",
"RoomRateDetailsList": {
"RoomRateDetails": {
"roomTypeCode": 200166353,
"rateCode": 201887482,
"maxRoomOccupancy": 1,
"quotedRoomOccupancy": 1,
"minGuestAge": 3,
"roomDescription": "Single Beds in Mixed Dormitory Room - Non refundable",
"currentAllotment": 8,
"propertyAvailable": true,
"propertyRestricted": false,
"expediaPropertyId": 4849100,
"rateKey": "0ABAAA83-04C7-5B91-40A2-754D72994DA3",
"RateInfo": {
"@rateChange": "false",
"@promo": "false",
"@priceBreakdown": "true",
"ChargeableRateInfo": {
"@total": "79.83",
"@surchargeTotal": "5.22",
"@nightlyRateTotal": "74.61",
"@maxNightlyRate": "24.87",
"@currencyCode": "EUR",
"@commissionableUsdTotal": "99.65",
"@averageRate": "24.87",
"@averageBaseRate": "24.87",
"NightlyRatesPerRoom": {
"@size": "3",
"NightlyRate": [
{
"@promo": "false",
"@rate": "24.87",
"@baseRate": "24.87"
},
{
"@promo": "false",
"@rate": "24.87",
"@baseRate": "24.87"
},
{
"@promo": "false",
"@rate": "24.87",
"@baseRate": "24.87"
}
]
},
"Surcharges": {
"@size": "1",
"Surcharge": {
"@amount": "5.22",
"@type": "TaxAndServiceFee"
}
}
}
},
"ValueAdds": {
"@size": "1",
"ValueAdd": {
"@id": "2048",
"description": "Free Wireless Internet"
}
}
}
}
}
}
}
}