src/vs/workbench/contrib/webviewPanel/browser/webviewEditorInputSerializer.ts/WebviewEditorInputSerializer/serialize
class WebviewEditorInputSerializer:	public serialize(input: WebviewInput): string | undefined {
		if (!this._webviewWorkbenchService.shouldPersist(input)) {
			return undefined;
		}

		const data = this.toJson(input);
		try {
			return JSON.stringify(data);
		} catch {
			return undefined;
		}
	}