PDA

View Full Version : [4.1.1] M$ JavaScriptSerializer can't deserialize JSON with date in "MS" format



Ex_Soft
22 Aug 2012, 1:50 PM
A FormatException is occured.
JSON


request "[{\"Id\":0,\"BirthDate\":\"\\\\/Date(1345671679078)\\\\/\"}]" string

If


request "[{\"Id\":0,\"BirthDate\":\"\\/Date(1345671679078)\\/\"}]" string

all ok.
Is this a bug?

Ex_Soft
24 Aug 2012, 11:48 AM
BTW,


var
d = new Date(),
tmpStr = Ext.Date.format(d, "MS"),
dp = Ext.Date.parse(tmpStr, "MS"); // dp = null

alert(dp);

http://jsfiddle.net/aKbnN/