src/vs/base/common/jsonFormatter.ts/toFormattedString
export function toFormattedString(obj: any, options: FormattingOptions) {
	const content = JSON.stringify(obj, undefined, options.insertSpaces ? options.tabSize || 4 : '\t');
	if (options.eol !== undefined) {
		return content.replace(/\r\n|\r|\n/g, options.eol);
	}
	return content;
}