MCPcopy
hub / github.com/colinhacks/zod / json

Function json

packages/zod/src/v4/classic/schemas.ts:2653–2659  ·  view source on GitHub ↗
(params?: string | core.$ZodCustomParams)

Source from the content-addressed store, hash-verified

2651}
2652
2653export function json(params?: string | core.$ZodCustomParams): ZodJSONSchema {
2654 const jsonSchema: any = lazy(() => {
2655 return union([string(params), number(), boolean(), _null(), array(jsonSchema), record(string(), jsonSchema)]);
2656 });
2657
2658 return jsonSchema;
2659}
2660
2661// preprocess
2662

Callers 1

Calls 8

lazyFunction · 0.70
unionFunction · 0.70
stringFunction · 0.70
numberFunction · 0.70
booleanFunction · 0.70
_nullFunction · 0.70
arrayFunction · 0.70
recordFunction · 0.70

Tested by

no test coverage detected