我想使用 PHP 解析来自 onesignal API 的响应。以下是 API 响应的结构。我想打印唯一的某些参数。我怎样才能做到这一点?
{
"adm_big_picture": "",
"adm_group": "",
"adm_group_message": {
"en": ""
},
"adm_large_icon": "",
"adm_small_icon": "",
"adm_sound": "",
"spoken_text": {},
"alexa_ssml": null,
"alexa_display_title": null,
"amazon_background_data": false,
"android_accent_color": "FF9900FF",
"android_group": "group key",
"android_group_message": {
"en": "group message for Android 6.0 and older"
},
"android_led_color": null,
"android_sound": null,
"android_visibility": 1,
"app_id": "3beb3078-e0f1-4629-af17-fde833b9f716",
"big_picture": "https://img.onesignal.com/n/37326fcc-2baa-45da-891c-ca9454a64957.png",
"buttons": null,
"canceled": false,
"chrome_big_picture": "",
"chrome_icon": "",
"chrome_web_icon": "https://picture-resource.com/icon-image.png",
"chrome_web_image": "https://picture-resource.com/image.png",
"chrome_web_badge": "https://picture-resource.com/badge.png",
"content_available": false,
"contents": {
"en": "English Message"
},
"converted": 1,
"data": {
"additional": "data",
"campaign": "25"
},
"delayed_option": "immediate",
"delivery_time_of_day": "2:32PM",
"errored": 4,
"excluded_segments": [],
"failed": 0,
"firefox_icon": "https://picture-resource.com/firefox_icon.png",
"global_image": "https://link-to-your-image.com/image-resource-file.png",
"headings": {
"en": "English Message Title 😊"
},
"id": "fd1723c6-bfaf-4f53-b4f4-0408ff43e18a",
"include_player_ids": null,
"include_external_user_ids": null,
"included_segments": [
"Subscribed Users"
],
我只想打印某些参数,以便我可以做进一步的处理。但我无法解析响应。
湖上湖