이 어떤 URL에서 내 JSON
텍스트입니다 http://www.example.com/json.php구문 분석 JSON ++ 블랙 베리 10
어느 한 내가이 JSON을 구문 분석 어떻게 말해 그것은 할 수 있도록 사용자의 ListView에 배열에 모달를 넣을 수 있습니다하십시오 ?
이전에 iOS 개발자였던 Blackberry 개발을 처음 접했음을 알려드립니다.
나는이 link을 확인했지만 실행할 수 없습니다.
완벽한 솔루션 (예 또는 사용법)이있는 사용자가있는 경우 도와주세요.
JSON
의 샘플을 developer.blackberry.com에서 다운로드했지만 실행할 수 없습니다.
은 또한 그것은 모든 JsonDataAccess
의 문서에 설명 된 것이 link
{
"status": "success",
"result": [
{
"offer_id": "456",
"member_id": "648",
"offer_type": "printable",
"cat_name": "Health & Wellbeing",
"price": "50",
"discount": "20% Off.",
"title": "20% Off",
"quantity": "200",
"details": "Enjoy 20% Off any Service.",
"coupon_code": "45600010106",
"company_logo": "http://beta/files/offers/logos/",
"offer_image": "http://beta/files/offers/images/f4d118737e_image_456.jpg",
"bc_image": "http://beta/files/offers/qrcodes/qrcouponid_45600010106.png",
"company_address1": "Oud Metha - Mohammed Saeed Hareb Bldg. Opp. American Hospital",
"company_address2": "Not Available",
"company_city": "Not Available",
"company_phone": "04 357 6738 Mob: 509284567",
"location": "Oud Metha",
"company_name": "Golden House Gents Spa Club",
"merchant_name": "Golden House Gents Spa Club",
"url": "http://google.com",
"date_end": "2013/12/30",
"date_start": "2013/07/25",
"condition": "1. Cannot be Combined with any other offer.\r\n2. Advance booking required.\r\n3. This Voucher must be Mentioned during time of Booking.\r\n4. Not Valid on Thurs & Sat.\r\n5. Expires 31st December 2013.",
"rating": "0",
"latitude": "25.2374",
"longitude": "55.3117"
}
]
}
내가 뭘 배열을 정렬 할 해달라고합니다. 하지만 결과를 웹 서비스에서 온 것으로 보여주고 싶습니다. 나는이 GroupDataModel을 시도했다 * model = 새로운 GroupDataModel(); 하지만 역순으로 표시하고 있습니다. –
키를 지정하지 않고 순서를 바꾸면''sortedAscending''을 반대로 바꾸면됩니다 (https://developer.blackberry.com/cascades/reference/bb__cascades__groupdatamodel.html). # property-sortedascending) 속성을 사용합니다. –