TypeScript types for the JSON Resume schema, a compiled
JSON Schema for validation, and a lossless bidirectional mapper between JSON Resume
documents and the ResumeContent type used by @prosperis/resumes.
Use this package to import a standard JSON Resume file into the builder, or to export builder content back out to the interoperable JSON Resume format.
bun add @prosperis/resume-format
# or: npm install @prosperis/resume-format@prosperis/resumes is a peer dependency — install it alongside this package.
import { jsonResumeToResumeContent } from "@prosperis/resume-format";
import { ResumeBuilder, DEFAULT_STYLE_CONFIG } from "@prosperis/resumes";
import "@prosperis/resumes/styles.css";
import { useState } from "react";
import type { ResumeContent, StyleConfig } from "@prosperis/resumes";
// A JSON Resume document — from a file, an API, or user input.
import myJsonResume from "./my-resume.json";
export function Editor() {
const [content, setContent] = useState<ResumeContent>(
() => jsonResumeToResumeContent(myJsonResume),
);
const [style, setStyle] = useState<StyleConfig>(DEFAULT_STYLE_CONFIG);
return (
<ResumeBuilder
content={content}
style={style}
onChange={setContent}
onStyleChange={setStyle}
/>
);
}import { resumeContentToJsonResume } from "@prosperis/resume-format";
const jsonResume = resumeContentToJsonResume(content);import { validateJsonResume } from "@prosperis/resume-format";
const { valid, errors } = validateJsonResume(unknownData);
if (!valid) {
console.error("Invalid JSON Resume:", errors);
}Converts a JSON Resume document into the ResumeContent shape expected by
<ResumeBuilder>. The mapping is lossless for every field the Prosperis ecosystem
uses: personal info, work experience, education, skills, certificates, projects,
awards, and social profiles.
The inverse operation. Converts ResumeContent back to a well-formed JSON Resume
document. Round-tripping through both directions is lossless for all mapped fields.
Validates an unknown value against the bundled JSON Resume JSON Schema (powered by
Ajv). Returns a valid flag and a list of human-readable
error messages.
The full TypeScript type for a JSON Resume document. All fields are optional in accordance with the spec.
import type { JsonResume } from "@prosperis/resume-format";| Package | Role |
|---|---|
@prosperis/resumes |
Provides the ResumeContent type (peer dependency) |
ajv |
JSON Schema validation |
bun install
bun run typecheck # tsc --noEmit
bun run test # vitest
bun run build # typecheck + vite lib build → dist/MIT