Json.parse error in jsb with some string

var x="%7B%22str%22%3A%22%7B%5C%22iv%5C%22%3A%5C%22bUuMGuZLZ59XEbSfSslk%2Fw%3D%3D%5C%22%2C%5C%22v%5C%22%3A1%2C%5C%22iter%5C%22%3A1000%2C%5C%22ks%5C%22%3A256%2C%5C%22ts%5C%22%3A64%2C%5C%22mode%5C%22%3A%5C%22ccm%5C%22%2C%5C%22adata%5C%22%3A%5C%22%5C%22%2C%5C%22cipher%5C%22%3A%5C%22aes%5C%22%2C%5C%22salt%5C%22%3A%5C%22esnbut8wpv7bke29A%3D%3D%3D%5C%22%2C%5C%22ct%5C%22%3A%5C%22SPYDAieGVfrMwFI%2BFWj10y39fQ%3D%3D%5C%22%7D%22%2C%22crc%22%3A%5B1456851002335%2C1455174730676%2C1455601520173%2C1455596179746%2C1457722629386%2C1456767261417%2C1454345441522%2C1456104054495%5D%2C%22t%22%3A1456155747398%7D";
var y=decodeURIComponent(x);
var z=JSON.parse(y);

these code can work fine in web browser, but error in jsb at line with JSON.parse.

how to solve it?

i have encountered this issue too…
i am using socket io lately and is emit this json data from my server to clients…
then i JSON.parse it in them… but if you are running in native you can JSON.parse it twice then youll got the results…

var data;
data = JSON.parse(data);
data = JSON.parse(data);

its kind of dirty but it did the trick…

try to look at the value of your variable in the jsb debbug… and youll see what Json parse does when it parse the data for the first time hope it helps…