@seasketch/geoprocessing
Version:
Geoprocessing and reporting framework for SeaSketch 2.0
11 lines • 461 B
JavaScript
import { z } from "zod";
const jsonValueSchema = z.string().or(z.number()).or(z.boolean()).or(z.null());
//lazy circular references supporting nested JSON -- https://stackoverflow.com/a/75786078
const jsonArraySchema = z.lazy(() => z.array(jsonValueSchema));
const jsonRecordSchema = z.lazy(() => z.record(jsonValueSchema));
export const jsonSchema = z.union([
jsonValueSchema,
jsonArraySchema,
jsonRecordSchema,
]);
//# sourceMappingURL=base.js.map