Automattic / simplenote-electron

Simplenote for Web, Windows, and Linux
https://app.simplenote.com
GNU General Public License v2.0
4.78k stars 557 forks source link

JSON import: Validate structure of JSON file #2517

Open codebykat opened 3 years ago

codebykat commented 3 years ago

Follow-up task from https://github.com/Automattic/simplenote-electron/pull/2446

See https://github.com/Automattic/simplenote-electron/pull/2446#discussion_r519026400

Expected

Importing a JSON file that isn't a Simplenote export returns an errror.

Observed

It crashes instead.

Reproduced

  1. Find a random .json file (not a Simplenote export)
  2. Try to import it
pachlava commented 1 year ago

+1 from 5617364-zd-woothemes:

I'm actually trying to migrate from Google Keep. Google Takeout exports via JSON, but each time I try to upload one (or many) JSON files via Simplenote's import option (via Microsoft Edge 106 on macOS 12.6), it stays on importing for 10+ minutes without any progress.