appcelerator titanium cannot parse JSON -


i'm new titanium , difficulty in parsing json mysql export. json valid , feel frustrated many unsuccessful trials. simplify code, put below. code stop , said: [error] script error = unable parse json string

var win = titanium.ui.currentwindow;   var hotdealjson = "{'hotdeal':[{'place':'bangkok','date':'4d3n','cost':'$4999up'},{'place':'tokyo','date':'3d2n','cost':'$3799up'}]}";   //read json var response = json.parse(hotdealjson); alert(response.hotdeal.length); 

thanks & regards, richard

the json invalid. single quotes should double quotes.

a common mistake.


Comments

Popular posts from this blog

linux - Mailx and Gmail nss config dir -

c# - Is it possible to remove an existing registration from Autofac container builder? -

php - Mysql PK and FK char(36) vs int(10) -