PDA

View Full Version : JSON.parse error



momentqt
28 Mar 2011, 2:06 AM
I have a problem now with secha touch. I dont know why because in other module it run but at recent module it die.
I want to process a json response but Ext.decode() dont work
this my code:

Ext.decode(rsp.responseText.replace(/"\\\/(Date\([0-9-]+\))\\\/"/gi, 'new $1'));

and this is response text:

[[{"OrderId":305980,"PlacedDate":"\/Date(1301304030000)\/","TradingDate":"\/Date(1301245200000)\/","ObjectStatusCode":"SENDING","Symbol":"SSI","IsSelling":0,"OrderTypeCode":null,"Volume":50,"Price":100,"Matched":0,"Fee":15,"ChannelCode":"WEB","SEOrderNo":"","ExchangeCode":"HOSTC"}],{"Code":0,"Message":"Success"}]

error: Uncaught SyntaxError: Unexpected token ILLEGAL.

i ask google many time but he cant help me.
someone can resolve it? Thanks!

momentqt
28 Mar 2011, 5:21 PM
help help help