src/vs/workbench/contrib/customEditor/browser/customEditorInputFactory.ts/CustomEditorInputSerializer/serialize
class CustomEditorInputSerializer:	public override serialize(input: CustomEditorInput): string | undefined {
		const dirty = input.isDirty();
		const data: SerializedCustomEditor = {
			...this.toJson(input),
			editorResource: input.resource.toJSON(),
			dirty,
			backupId: dirty ? input.backupId : undefined,
		};

		try {
			return JSON.stringify(data);
		} catch {
			return undefined;
		}
	}