JSON Schema
Machine-readable schema for validating manifest.json files.
Download
JSON Schema draft 2020-12. Validates the manifest.json file
inside a .brfr archive.
Usage
Node.js (ajv)
import Ajv from 'ajv';
import schema from './manifest.schema.json';
const ajv = new Ajv();
const validate = ajv.compile(schema);
const manifest = JSON.parse(manifestJson);
if (!validate(manifest)) {
console.error(validate.errors);
}
Python (jsonschema)
import json
from jsonschema import validate, ValidationError
with open('manifest.schema.json') as f:
schema = json.load(f)
with open('manifest.json') as f:
manifest = json.load(f)
try:
validate(manifest, schema)
except ValidationError as e:
print(e.message)
Command Line (ajv-cli)
npx ajv validate -s manifest.schema.json -d manifest.json
Schema Reference
The schema validates:
- Required fields:
version,id,title,steps - UUID v4 format for
idfield - Valid element types:
text,image,svg,row - Annotation types:
arrow,circle,rect,label,freehand - Normalized coordinates (0.0 to 1.0) for annotations
- Valid presets, zones, and color values
Note: The schema validates manifest structure only.
It does not verify that referenced media files exist in the archive.
IDE Integration
Add to your manifest.json for autocomplete and validation:
{
"$schema": "https://brfr.dev/schema/manifest.schema.json",
"version": "0.10",
...
}