code: function(array) {
              var json;
              var pieces = ['['];
              this.level += 1;
      
              for(var i=0, len=array.length; i<len; ++i) {
                  // recursive calls need to allow for sub-classing
                  json = OpenLayers.Format.JSON.prototype.write.apply(this,
                                                      [array[i], this.pretty]);
                  if(json != null) {
                      if(i > 0) {
                          pieces.push(',');
                      }
                      pieces.push(this.writeNewline(), this.writeIndent(), json);
                  }
              }
  
              this.level -= 1;    
              pieces.push(this.writeNewline(), this.writeIndent(), ']');
              return pieces.join('');
          }
docs: Method: serialize.array
  Transform an array into a JSON string.
  
  Parameters:
  array - {Array} The array to be serialized
  
  Returns:
  {String} A JSON string representing the array.