(json)
| 3771 | var ajax = oSettings.ajax |
| 3772 | var instance = oSettings.oInstance |
| 3773 | var callback = function (json) { |
| 3774 | var status = oSettings.jqXHR ? oSettings.jqXHR.status : null |
| 3775 | |
| 3776 | if (json === null || (typeof status === "number" && status == 204)) { |
| 3777 | json = {} |
| 3778 | _fnAjaxDataSrc(oSettings, json, []) |
| 3779 | } |
| 3780 | |
| 3781 | var error = json.error || json.sError |
| 3782 | if (error) { |
| 3783 | _fnLog(oSettings, 0, error) |
| 3784 | } |
| 3785 | |
| 3786 | // Microsoft often wrap JSON as a string in another JSON object |
| 3787 | // Let's handle that automatically |
| 3788 | if (json.d && typeof json.d === "string") { |
| 3789 | try { |
| 3790 | json = JSON.parse(json.d) |
| 3791 | } catch (e) { |
| 3792 | // noop |
| 3793 | } |
| 3794 | } |
| 3795 | |
| 3796 | oSettings.json = json |
| 3797 | |
| 3798 | _fnCallbackFire(oSettings, null, "xhr", [oSettings, json, oSettings.jqXHR], true) |
| 3799 | fn(json) |
| 3800 | } |
| 3801 | |
| 3802 | if ($.isPlainObject(ajax) && ajax.data) { |
| 3803 | ajaxData = ajax.data |
no test coverage detected