serializeJson: function (obj) {
var serializeObj = {};
var array = $(obj).serializeArray();
var str = $(obj).serialize();
$(array).each(function () {
if (undefined != this.value && '' != this.value) {
if (serializeObj[this.name]) {
if ($.isArray(serializeObj[this.name])) {
serializeObj[this.name].push(this.value);
} else {
serializeObj[this.name] = [serializeObj[this.name], this.value];
}
} else {
serializeObj[this.name] = this.value;
}
}
});
return serializeObj;
},