Skip to content

feat: alta-from-json loader for raw JSON Resume input #48

@smur89

Description

@smur89

Problem

The whole point of JSON Resume is portability — one resume.json file used across many renderers. Today the template requires the caller to hand-translate the JSON into a Typst dict (different quoting, content vs string distinction, etc.). That friction makes the JSON Resume compatibility story aspirational.

Proposed solution

Add a public entrypoint alta-from-json(json-source, labels: (:), preferences: (:)) that:

  1. Reads or accepts a JSON string (or accepts an already-parsed dict).
  2. Validates the shape against the supported subset (panicking with helpful messages on unknown sections).
  3. Coerces strings → content where the renderer expects content (e.g. highlights[], summary).
  4. Calls alta() with the result.

Usage:

#import "@preview/altacv:0.x.x": alta-from-json

#alta-from-json(read("resume.json"))

Alternatives considered

  • A separate companion script — kills the "single typst compile" workflow.
  • Make alta() accept JSON directly — overloads the entrypoint; better to keep concerns separate.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions