Serialize advice method into array
174297
public static function serializeAdvice(Closure $adviceMethod): array
    {
        $refAdvice = new ReflectionFunction($adviceMethod);

        return [
            'method' => $refAdvice->name,
            'class'  => $refAdvice->getClosureScopeClass()->name
        ];
    }
990195
public MethodDoc[] serializationMethods() {
        if (serializedForm == null) {
            serializedForm = new SerializedForm(env, tsym, this);
        }
        //### Clone this?
        return serializedForm.methods();
    }
414310
private void _serializeList(List list, StringBuilder sb, Set<Object> done) throws ConverterException {

	sb.append(goIn());
	sb.append("[");
	boolean doIt = false;
	ListIterator it = list.listIterator();
	while (it.hasNext()) {
	    if (doIt) sb.append(',');
	    doIt = true;
	    _serialize(it.next(), sb, done);
	}

	sb.append(']');
    }
246024
public function serialize()
    {
        try {
            $this->data = $this->data ?: Serializer::getData($this->closure, true);

            return Serialize::encode($this->data, Serializer::getSerializeType());
        } catch (\Exception $e) {
            \trigger_error('Serialization of closure failed: ' . $e->getMessage());
            // Note: The serialize() method of Serializable must return a string
            // or null and cannot throw exceptions.
            return null;
        }
    }
767272
function serialize(value) {
  if (Array.isArray(value) === true) {
    return serializeArray(value);
  }
  if (isObject(value) === false) {
    return serializePrimitive(value);
  }
  return serializeObject(value);
}
537509
public function toArray()
	{
		return [
			'creator' => SerializationHelper::stringOrNull($this->creator),
			'metadata' => SerializationHelper::serialize($this->metadata),
			'waypoints' => SerializationHelper::serialize($this->waypoints),
			'routes' => SerializationHelper::serialize($this->routes),
			'tracks' => SerializationHelper::serialize($this->tracks),
			'extensions' => SerializationHelper::serialize($this->extensions)
		];
	}
763629
private String _serializeArray(Array array, Map<Object, String> done, String id) throws ConverterException {
	return _serializeList(array.toList(), done, id);
    }
837822
def dumps(self, value):
    ''''''
    for serializer in self:
      value = serializer.dumps(value)
    return value
1009516
def serialize_attributes
    attr_hash = {}
    @attributes.each_pair do |name,value|
      attr_hash[name] = serialize_attribute(name,value)
    end
    attr_hash[:id] = serialize_id unless new?
    attr_hash
  end
933764
private void _serializeArray(PageContext pc, Set test, Array array, StringBuilder sb, boolean serializeQueryByColumns, Set<Object> done) throws ConverterException {
	_serializeList(pc, test, array.toList(), sb, serializeQueryByColumns, done);
    }
224129
public function serialize() {
		$attributes = array();

		if ( $this->visible ) {
			// If visible attributes are set, we'll only reveal those.
			foreach ( $this->visible as $key ) {
				$attributes[ $key ] = $this->get_attribute( $key );
			}
		} elseif ( $this->hidden ) {
			// If hidden attributes are set, we'll grab everything and hide those.
			foreach ( $this->get_attribute_keys() as $key ) {
				if ( ! in_array( $key, $this->hidden ) ) {
					$attributes[ $key ] = $this->get_attribute( $key );
				}
			}
		} else {
			// If nothing is hidden/visible, we'll grab and reveal everything.
			foreach ( $this->get_attribute_keys() as $key ) {
				$attributes[ $key ] = $this->get_attribute( $key );
			}
		}

		return array_map( function ( $attribute ) {
			if ( $attribute instanceof Serializes ) {
				return $attribute->serialize();
			}

			return $attribute;
		}, $attributes );
	}
375361
function serialize(iterable, options = {}) {
  if (!(isArray(iterable) || isPlainObject(iterable))) {
    throw new TypeError("Expected object or array as the first argument.")
  }

  if (isBoolean(options)) {
    options = {strict: options}
  } else if (isString(options) && options) {
    options = {root: options}
  }

  if (!isPlainObject(options)) {
    throw new TypeError(
      "The second argument can be an object, boolean or string value."
    )
  }

  options = assign({}, defaults, options)

  // Choose the serialization method for browsers which
  // are support FormData API partially
  // See: https://caniuse.com/#search=formdata
  const method = isFunction(FormData.prototype.set) ? "set" : "append"

  const fd = new FormData()

  /**
   * Set object fields to FormData instance
   *
   * @param {string} [prefix = undefined] – parent field key
   * @param {any} value – A value of the current field
   *
   * @api private
   */
  function set(prefix, value) {
    for (const key of keys(value)) {
      const name = prefix ? `${prefix}[${key}]` : key
      const field = value[key]

      if (isArray(field) || isPlainObject(field)) {
        set(name, field)
      } else {
        if (options.strict && (isBoolean(field) && field === false)) {
          continue
        }

        fd[method](name, field)
      }
    }
  }

  set(options.root, iterable)

  return fd
}
44973
private String _serializeList(List list, Set<Object> done) throws ConverterException {
	StringBuilder sb = new StringBuilder(goIn() + "<array length=" + del + list.size() + del + ">");

	ListIterator it = list.listIterator();
	while (it.hasNext()) {
	    sb.append(_serialize(it.next(), done));
	}

	sb.append(goIn() + "</array>");
	return sb.toString();
    }
950114
function serialize(queryParams) {
  return Object.keys(queryParams)
    .filter(key => queryParams[key] !== undefined)
    .map(key => arrayToStr(key, queryParams[key]))
    .join('&');
}
784362
function serializeHash() {
      var hash = {}
      eachFormElement.apply(function (name, value) {
        if (name in hash) {
          hash[name] && !isArray(hash[name]) && (hash[name] = [hash[name]])
          hash[name].push(value)
        } else hash[name] = value
      }, arguments)
      return hash
    }
9570
def serialize_args(self):
        """"""

        args, kwargs = super(ListParameter, self).serialize_args()
        args.insert(0, [self.param_type.id, self.param_type.serialize_args()])
1176512
function dictify(serializedFormArray) {
  var o = {};
  $.each(serializedFormArray, function() {
    if (o[this.name] !== undefined) {
      if (!o[this.name].push) {
        o[this.name] = [o[this.name]];
      }
      o[this.name].push(this.value || '');
    } else {
      o[this.name] = this.value || '';
    }
  });
  return o;
}