@citolab/qti-json-schema-converters
v1.0.17
Published
Custom QTI <-> exam converters backed by the QTI JSON schema models
Keywords
Readme
@citolab/qti-json-schema-converters
Custom QTI ↔ JSON converters backed by @citolab/qti-json-schemas.
This package provides TypeScript converters for transforming between QTI XML content and the normalized JSON format defined by the QTI JSON Schema project. It enables bidirectional conversion while preserving assessment semantics in a format that's easier for modern applications and LLMs to process.
Installation
npm install @citolab/qti-json-schema-convertersUsage
import { QtiExamConverter } from '@citolab/qti-json-schema-converters';
const converter = new QtiExamConverter();
// Convert QTI ZIP package to JSON
const examDocument = await converter.convertQtiToExamDocument(qtiZipBuffer);
// Convert JSON back to QTI format
const qtiZip = await converter.convertExamDocumentToQti(examDocument);Features
- Bidirectional conversion: QTI XML ↔ Normalized JSON
- ZIP package support: Handle complete QTI assessment packages
- Standards compliant: Based on QTI specification
- Type safe: Built with TypeScript using
@citolab/qti-json-schemas - LLM friendly: Produces clean JSON suitable for AI processing
Supported QTI Elements
- Choice interactions (single and multiple)
- Text entry interactions
- Extended text interactions
- Match interactions
- Order interactions
- Assessment items and metadata
- Response processing and scoring
Related Packages
@citolab/qti-json-schemas- TypeScript models and typescitolab-qti-json-schema-converters- Python version of these convertersCitolab.QtiJsonSchema.Converters- C# version of these converters
Project
This package is part of the QTI JSON Schemas project, which aims to create a shared JSON representation for assessment content that reduces dependency on QTI XML markup details and provides a cleaner format for LLM-oriented pipelines.
