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.
967026
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('');
        }
1075290
function __serializeArrayStreaming(data, options=DEFAULT_OPTIONS) {
	let dataBuffers = [];
	// ignore undefined value
	for (let key in data) {
		let subData = data[key];
		let subType = __getType(subData, options);
		let subTypeBuffer = __serializeType(subType);
		let subDataBuffers = __serializeData(subType, subData, options);
		dataBuffers.push(subTypeBuffer, ...subDataBuffers);
	}
	return [...dataBuffers, TYPE_HEADER.ARRAY_END];
}
1361122
function toJSON() {
    function filter(obj) {
      return Object.keys(obj)
        .filter(function(key) {
          return typeof obj[key] !== 'function' && key[0] !== '_';
        })
        .reduce(function(clone, key) {
          clone[key] = typeof obj[key] !== 'object' ?
            obj[key] : filter(obj[key]);
          return clone;
        }, Array.isArray(obj) ? [] : {});
    }
    return JSON.stringify(filter(obj));
  }
563071
function createArray() {
  const arr = [];
  arr.__proto__ = new Array;
  arr.__proto__.format = function toString() {
    return this.map(obj => ({
      ...obj,
      path: obj.path.join(' > '),
    }));
  };
  arr.__proto__.toString = function toString() {
    return JSON.stringify(this.format(), null, 2);
  };
  return arr;
}
1050751
function parseArray(array) {
  const templates = array.map(parse);
  const templateParameters = templates.reduce(
    (parameters, template) => parameters.concat(template.parameters),
    []
  );
  const templateFn = context => templates.map(template => template(context));

  return Template(templateFn, templateParameters);
}
257453
def from_array(array):
        
        if array is None or not array:
            return None
        # end if
        assert_type_or_raise(array, dict, parameter_name="array")

        data = {}
        data['id'] = int(array.get('id'))
        data['is_bot'] = bool(array.get('is_bot'))
        data['first_name'] = u(array.get('first_name'))
        data['last_name'] = u(array.get('last_name')) if array.get('last_name') is not None else None
        data['username'] = u(array.get('username')) if array.get('username') is not None else None
        data['language_code'] = u(array.get('language_code')) if array.get('language_code') is not None else None
        data['_raw'] = array
        return User(**data)
43110
function serializeJsonParams(params) {

  var result = {}
  if (params) {
    for (var key in params) {
      if (_.isArray(params[key])) {
        result[key] = _.map(params[key], function(val) {
          return _.isObject(val) ? ejson.stringify(val) : val
        })
      } else if (_.isObject(params[key])) {
        result[key] = ejson.stringify(params[key])
      } else {
        result[key] = params[key]
      }
    }
  }

  return result
}
194215
def serialize(self):
        

        data = {}
        for k, v in self.iteritems():
            if k.startswith('_'):
                continue

            if isinstance(v, APIModel):
                data[k] = v.serialize()
            elif v and is_seq_not_string(v) and isinstance(v[0], APIModel):
                data[k] = [x.serialize() for x in v]
            else:
                data[k] = v

        return data
161511
function(_data,_key,_map){
            if (_u._$isArray(_data)){
                _map[_key] = JSON.stringify(_data);
            }
        }
72839
function objectToArray(object) {
    var key = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'id';

    var convertedArray = [];

    Object.keys(object).forEach(function (_key) {
      var item = object[_key];
      item[key] = _key;
      convertedArray.push(item);
    });

    return convertedArray;
  }
784237
function JsonArray(arr) {
    if (!(this instanceof JsonArray)) {
        return new JsonArray(arr);
    }
    Array.call(this);
    var i = -1, l = arr.length;
    while (++i < l) {
        this.push(arr[i]);
    }
}
1041671
def _convert_list_to_json(array):
    
    return json.dumps(array, skipkeys=False, allow_nan=False, indent=None, separators=(",", ":"))
607927
function stringifyArray(arr, prefix) {
  var ret = [];
  if (!prefix) throw new TypeError('stringify expects an object');
  for (var i = 0; i < arr.length; i++) {
    ret.push(stringify(arr[i], prefix + '[]'));
  }
  return ret.join('&');
}
918971
function (arr) {
    var jsonData = {};
    _.forEach(arr, function (elem) {
      var keys = Object.keys(elem);
      _.forEach(keys, function (key) {
        var value = elem[key];
        jsonData[key] = value;
      });
    })
    return jsonData;
  }
529856
function to_array(args) {
    var len = args.length,
        arr = new Array(len), i;

    for (i = 0; i < len; i += 1) {
        arr[i] = args[i];
    }

    return arr;
}
807202
def serialize(objects=None):
    

    return serializers.serialize(
        "json",
        objects,
        ensure_ascii=True,
        use_natural_foreign_keys=True,
        use_natural_primary_keys=False,
    )
948047
protected function serializeArray(array $array) {
        $data = [];

        foreach ($array as $key => $value) {
            if (is_array($value)) {
                $data[$key] = $this->serializeArray($value);
            } else {
                $data[$key] = $this->serializeItem($value);
            }
        }

        return $data;
    }