Eric Garcia
Eric Garcia

Reputation: 1

pushwoosh Send Push - Additional data - custom data

Setting in custom data of my push:

{"tab":"question","url":"http://www.webyo.es"}

And on my Android I'm receiving:

{"u":"{\"tab\":\"question\",\"url\":\"http:\/\/www.webyo.es"}"}

The Json received is not valid.

Upvotes: 0

Views: 174

Answers (2)

shader
shader

Reputation: 2121

Are you sure you received JSON with last quote (") not escaped? This can't be true. This is what I receive:

"u":"{\"tab\":\"question\",\"url\":\"http://www.webyo.es\"}"

Please note "u" is a JSON String.

Upvotes: 0

yajnesh
yajnesh

Reputation: 2129

The JSON you received is invalid, corrected JSON is ,

{
    "u" : {
        "tab" : "question",
        "url" : "http://www.webyo.es"
    }
}

minified java version,

String s="{\"u\":{\"tab\":\"question\",\"url\":\"http://www.webyo.es\"}}";

Upvotes: 0

Related Questions