Extraction schema reference
ParseHawk accepts a focused JSON Schema Draft 2020-12 authoring dialect. The dialect is intentionally smaller than general JSON Schema so an extractor can turn the same contract into model guidance, output validation, and typed downstream data.
Download the canonical meta-schema
or validate a file with parsehawk schemas validate schema.json.
Supported shapes
Section titled “Supported shapes”| Shape | Supported authoring fields |
|---|---|
| Object | type, properties, required, additionalProperties, title, description |
| Array | type, items, title, description |
| String | type, pattern, minLength, maxLength, title, description |
| Number, integer, boolean | type, title, description |
| Enum | type, enum, optional x-parsehawk, title, description |
| Enum union | oneOf or anyOf branches containing const or enum |
| Nullable value | A two-item type union such as ["string", "null"] |
The root must be an object with type and properties. Object schemas must set
additionalProperties to false. Unknown schema keywords are rejected.
Minimal schema
Section titled “Minimal schema”{ "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "invoice_number": { "type": ["string", "null"], "description": "The invoice number exactly as printed." }, "total": { "type": ["number", "null"], "description": "The final amount due." } }, "required": ["invoice_number", "total"], "additionalProperties": false}Semantic hints
Section titled “Semantic hints”Set x-parsehawk.semantic on a string field to express the value’s meaning more
precisely than JSON Schema’s primitive type. These hints guide compatible models;
the JSON output still uses ordinary strings, numbers, integers, or booleans.
| Family | Values |
|---|---|
| Text | string, verbatim-string |
| Scalar | integer, number, boolean |
| Date and time | date, time, date-time, duration |
| Locale | country, currency, language, language-tag, script |
| Identifiers | url, email-address, phone-number, iban, bic, unit-code |
| Regions | region:US, region:FR, region:IE, region:GB, region:IT, region:ES, region:DE, region:PT, region:CA, region:MX, region:BR, region:AU, region:JP, region:KR |
{ "type": ["string", "null"], "description": "Invoice date in ISO 8601 format.", "x-parsehawk": { "semantic": "date" }}Source of truth
Section titled “Source of truth”The canonical meta-schema is committed at
docs/schemas/parsehawk-extraction-schema.schema.json. The generated page and
download endpoint are checked for drift in pre-commit and CI.