JSON a Zod
.JSON
JSON a Zod: Processa JSON localment al navegador sense pujar dades amb sortida Zod neta.
Exemple pràctic
RFC 8259 → Zod v3 SchemaEntrada
{
"service": "structfmt-api",
"version": 2,
"active": true,
"owner": { "name": "Ada Lovelace", "region": "us-east" },
"tags": ["json", "yaml", "schema"],
"metrics": [
{ "id": 1, "latencyMs": 14.2, "ok": true },
{ "id": 2, "latencyMs": 19.8, "ok": true }
]
...Sortida
import { z } from "zod";
export const RootSchema = z.object({
service: z.string(),
version: z.number().int(),
active: z.boolean(),
owner: z.object({
name: z.string(),
region: z.string(),
}),
...StructFmt
100% local · Sense pujades
Processa JSON localment al navegador sense pujar dades amb sortida Zod neta.
Formata i valida
JSON a Zod.
Esquemes i codi
Sortida: Zod.
Consulta i compara
Copia / Baixa.
JSON a Zod
- 1Entrada: JSON (Obre fitxer).
- 2Transforma: JSON → Zod.
- 3Sortida: Zod (Copia / Baixa).
FAQ
100% local · Sense pujades (JSON)?
Processa JSON localment al navegador sense pujar dades amb sortida Zod neta.
JSON a Zod (JSON → Zod)?
Processa JSON localment al navegador sense pujar dades amb sortida Zod neta. (JSON → Zod).
Pas següent (Zod)?
Pas següent: StructFmt (Zod).