我从使用 Event Espresso 的 WP 获得以下 JSON。我想提取一些信息,例如Event's name、Venue和Datetimes。我也想使用AFNetworking
.
{
"status": "OK",
"status_code": 200,
"body": {
"Events": [
{
"id": 1,
"code": "1-5123548",
"name": "Name of Event",
"description": "some description here",
"status": "active",
"limit": 500,
"group_registrations_allowed": false,
"group_registrations_max": 5,
"active": true,
"member_only": false,
"virtual_url": "",
"call_in_number": "",
"phone": "",
"metadata": {
"default_payment_status": "Incomplete",
"venue_id": 1,
"additional_attendee_reg_info": "2",
"add_attendee_question_groups": {
"1": "1"
},
"date_submitted": "March 12, 2013",
"event_thumbnail_url": "/../auditing-photo-150x150.jpg",
"event_hashtag": "",
"event_format": "",
"event_livestreamed": "",
"": ""
},
"Datetimes": [
{
"id": 93,
"is_primary": true,
"event_start": "2013-03-15 10:00:00",
"event_end": "2013-03-16 17:00:00",
"registration_start": "2013-01-01 08:00:00",
"registration_end": "2013-03-21 17:00:00",
"limit": 500,
"tickets_left": 500
}
],
"Venues": [
{
"id": 1,
"name": "Menara SSM",
"identifier": "1-513f488c788a2",
"address": "No. 7, Jalan Stesen Sentral 5",
"address2": "Kuala Lumpur Sentral",
"city": "Kuala Lumpur",
"state": "Federal Territory of Kuala Lumpur",
"zip": "50623",
"country": "Malaysia",
"user": 1
}
],
"Categories": [
{
"id": 3,
"name": "category",
"identifier": "a",
"description": "",
"user": 1
}
],
"Prices": [
{
"id": 73.2,
"name": "Registration Fee",
"amount": 500,
"description": null,
"limit": 500,
"remaining": 500,
"start_date": null,
"end_date": null,
"Pricetype": {
"id": 4,
"name": "Member Price",
"is_member": true,
"is_discount": false,
"is_tax": false,
"is_percent": false,
"is_global": true,
"order": 0
}
}
]
}
]
}
}
希望有人可以帮助提出一种方法来做到这一点。在 Objective-C 上相当新。提前致谢。