Ext.util.JSON._dateRegExp = new RegExp('(^|[^\\\\])\\"\\\\/Date\\((-?[0-9]+)(?:[a-zA-Z]|(?:\\+|-)[0-9]{4})?\\)\\\\/\\"', 'g');
Ext.util.JSON.decodeMsJson = function(json) {
if (json.indexOf('/Date') >= 0) {
json = json.replace(Ext.util.JSON._dateRegExp, '$1new Date($2)');
}
return Ext.util.JSON.decode(json);
};
相关文章: