Skip to content

Pretty-print Hyperaudio JSON and drop legacy import path#299

Merged
maboa merged 1 commit into
296-improved-json-formatfrom
298-pretty-print-json
May 27, 2026
Merged

Pretty-print Hyperaudio JSON and drop legacy import path#299
maboa merged 1 commit into
296-improved-json-formatfrom
298-pretty-print-json

Conversation

@maboa
Copy link
Copy Markdown
Member

@maboa maboa commented May 27, 2026

Summary

Two small follow-ups to #297:

  • Pretty-print the export. downloadJson now calls JSON.stringify(jsonData, null, 2) so exported files are indented and readable instead of one long line.
  • Drop the legacy import path. Removes the legacyJsonToHtml function, the jsonData.article fallback in jsonToHtml, and the jsonData.url back-compat in importJson. Anyone holding an old export can re-export from a recent build.

Closes #298.

Targets 296-improved-json-format. Merge once #297 lands; or merge #297 first and rebase this onto main.

Test plan

  • Export a transcript → file opens with indented, readable JSON.
  • Import the same file → transcript renders identically.
  • Attempt to import an old-format export (with article.section.paragraphs[].spans[]) → either fails or imports as empty, no crash.

- JSON.stringify with two-space indentation so exported files are
  readable and diffable instead of a single long line.
- Remove the legacyJsonToHtml function and the
  jsonData.article fallback in jsonToHtml — anyone holding an old
  export can re-export from a recent build.
- Drop the jsonData.url top-level back-compat in importJson; media
  URL is sourced exclusively from sections[0].mediaUrl now.

Closes #298.
@maboa maboa merged commit 0899009 into 296-improved-json-format May 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant