Skip to main content
Module

x/fun/mod.ts>json_schema.JsonBuilder

A collection of algebraic data types, lenses, and schemables based on a light weight higher kinded type implementation. Written for deno.
Go to Latest
type alias json_schema.JsonBuilder
import { type json_schema } from "https://deno.land/x/fun@v2.0.0-alpha.6/mod.ts";
const { JsonBuilder } = json_schema;

JsonBuilder is a wrapper over State, used to construct a JsonSchema combinator by combinator. In this way it can also be used as a Schemable to create a JsonSchema that matches a Decoder.

Currently, the JsonSchema only supports a subset of the full JSON Schema. There are no refinements or formats aside from the basic types and Date.