-Ext.direct.JsonProvider = Ext.extend(Ext.direct.Provider, {
- parseResponse: function(xhr){
- if(!Ext.isEmpty(xhr.responseText)){
- if(typeof xhr.responseText == 'object'){
- return xhr.responseText;
+
+Ext.define('Ext.direct.JsonProvider', {
+
+ /* Begin Definitions */
+
+ extend: 'Ext.direct.Provider',
+
+ alias: 'direct.jsonprovider',
+
+ uses: ['Ext.direct.ExceptionEvent'],
+
+ /* End Definitions */
+
+ /**
+ * Parse the JSON response
+ * @private
+ * @param {Object} response The XHR response object
+ * @return {Object} The data in the response.
+ */
+ parseResponse: function(response){
+ if (!Ext.isEmpty(response.responseText)) {
+ if (Ext.isObject(response.responseText)) {
+ return response.responseText;