src/vs/workbench/services/extensions/common/rpcProtocol.ts/MessageIO/serializeRequestArguments
class MessageIO:	public static serializeRequestArguments(args: any[], replacer: JSONStringifyReplacer | null): SerializedRequestArguments {
		if (this._arrayContainsBufferOrUndefined(args)) {
			let massagedArgs: VSBuffer[] = [];
			let massagedArgsType: ArgType[] = [];
			for (let i = 0, len = args.length; i < len; i++) {
				const arg = args[i];
				if (arg instanceof VSBuffer) {
					massagedArgs[i] = arg;
					massagedArgsType[i] = ArgType.VSBuffer;
				} else if (typeof arg === 'undefined') {
					massagedArgs[i] = VSBuffer.alloc(0);
					massagedArgsType[i] = ArgType.Undefined;
				} else {
					massagedArgs[i] = VSBuffer.fromString(stringify(arg, replacer));
					massagedArgsType[i] = ArgType.String;
				}
			}
			return {
				type: 'mixed',
				args: massagedArgs,
				argsType: massagedArgsType
			};
		}
		return {
			type: 'simple',
			args: stringify(args, replacer)
		};
	}