Ext.define("Ext.ux.data.dmd.Reader", {

	extend: "Ext.data.reader.Json",

	alternateClassName: [
		"Ext.data.DmdReader"
	],

	alias: "reader.dmd",

	root: "rows",

	totalProperty: "totalRows",

	nameProperty: "name",

	fields: null,

	extractData: function(a_root) {

		var i_reader = this;

		Ext.Array.each(a_root, function (o_item, n_index, a_context) {
			Ext.Object.each(o_item, function (s_key, value, o_context) {
				var s_hackedUpperCasedKeyHaveToFixService = s_key;
				o_context[s_hackedUpperCasedKeyHaveToFixService] = value;
			});

			a_context[n_index] = o_item;
		});

		var a_data = i_reader.callParent(arguments);

		return a_data;
	}
});
