- encodeValue : function(v){
- var enc;
- if(typeof v == "number"){
- enc = "n:" + v;
- }else if(typeof v == "boolean"){
- enc = "b:" + (v ? "1" : "0");
- }else if(Ext.isDate(v)){
- enc = "d:" + v.toGMTString();
- }else if(Ext.isArray(v)){
- var flat = "";
- for(var i = 0, len = v.length; i < len; i++){
- flat += this.encodeValue(v[i]);
- if(i != len-1) flat += "^";
+ encodeValue : function(value){
+ var flat = '',
+ i = 0,
+ enc,
+ len,
+ key;
+
+ if (value == null) {
+ return 'e:1';
+ } else if(typeof value == 'number') {
+ enc = 'n:' + value;
+ } else if(typeof value == 'boolean') {
+ enc = 'b:' + (value ? '1' : '0');
+ } else if(Ext.isDate(value)) {
+ enc = 'd:' + value.toGMTString();
+ } else if(Ext.isArray(value)) {
+ for (len = value.length; i < len; i++) {
+ flat += this.encodeValue(value[i]);
+ if (i != len - 1) {
+ flat += '^';
+ }