【问题标题】:Urban Airship showing wrong JSON payloadUrban Airship 显示错误的 JSON 有效载荷
【发布时间】:2018-07-18 15:38:55
【问题描述】:

我正在尝试从 Urban Airship 门户发送测试推送。我有设备的通道 ID,创建了 JSON 有效负载。但是,当我尝试发送时,它总是显示错误,对不起,这看起来不像是有效的 JSON。以下是我的有效载荷数据,请帮助我。

{
    "audience": {
        "ios_channel": "938a3a93-1a5f-466c-923b-827ef4b0a75b"
    },
    "notification": {
       "aps": {
            "alert": {
                "body": "Sample",
                "title": "Sample"
         }
       }
        "ios": {
            "badge": 3
        }
    },
    "device_types": [
        "ios"
    ]
} 

【问题讨论】:

    标签: ios notifications push


    【解决方案1】:

    这个有效,你忘了一个逗号,你可以用https://jsonlint.com这样的东西

    {
        "audience": {
            "ios_channel": "938a3a93-1a5f-466c-923b-827ef4b0a75b"
        },
        "notification": {
            "aps": {
                "alert": {
                    "body": "Sample",
                    "title": "Sample"
                }
            },
            "ios": {
                "badge": 3
            }
        },
        "device_types": [
        "ios"
        ]
    }
    

    【讨论】:

    • 感谢您的快速响应,但未显示 Urban Airship 无法解析请求正文。缺少一些东西,我不确定。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2012-12-29
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多