How to use the upad-parse/dist.Translators.Json function in upad-parse

To help you get started, we’ve selected a few upad-parse examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github MicroPad / Web / app / src / react-web / SearchWorker.ts View on Github external
await NOTEPAD_STORAGE.iterate((json: string) => {
		let shell: NotepadShell;
		try {
			shell = JSON.parse(json);
		} catch (ignored) {
			return;
		}

		notepads.push(
			Translators.Json.toFlatNotepadFromNotepad(shell, passkeys[shell.title])
				.catch(e =>
					console.warn(`Couldn't parse notepad: ${e}`)
				)
		);
		return;
	});
github MicroPad / Web / app / src / react-web / components / note-viewer / elements / JupyterInserterComponent.tsx View on Github external
readFileInputEventAsText(event).then(json => {
			insertElement({
				type: 'markdown',
				args: {} as ElementArgs,
				content: Translators.Json.toMarkdownFromJupyter(json)
			});
		}).catch(err => {
			console.error(err);