~/talk

JSONSchema as a runtime type system - Advanced concepts and practical uses

Talkat Functional Conf 2025 · 2025-01-24..01-25· [web-platform, typescript]
slides:none on file

Shows how JSON Schema models runtime types end to end: primitives, arrays, objects, recursion via $ref/$id, generics via dynamicRef and $defs, ADTs with oneOf/anyOf, and structural dependent constraints (if country == "United States of America" then postalCode matches regex). Demos use AJV and Hyperjump validators, extend AJV with a custom keyword to validate graph edges, use json-schema-faker for mock data, and TypeBox (with a JIT compiler) to share one definition between TypeScript compile-time and runtime. Structured generation constrains LLM output to valid JSON and the examples validate successfully.

AI-written summary · about

  1. 0:00JSONSchema as runtime type system
  2. 1:09JSONSchema fits runtime validation
  3. 5:01JSONSchema primitives and constraints
  4. 8:17Recursion in schemas
  5. 9:59Algebraic data types with generics
  6. 13:55Dependent types and validation
  7. 18:35Extending JSONSchema with custom vocabularies
  8. 22:50Compile-time versus runtime types
  9. 27:05LLMs and structured JSON output
  10. 33:15JSONSchema future directions
  11. 39:02Q&A
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.