Generador y Validador de JSON Schema (Draft-07)
Funciona sin conexiónInfiere esquemas JSON Schema formales (Draft-07, 2020-12) a partir de datos JSON. Validador interactivo, detección de formatos semánticos y exportación a interfaces TypeScript.
{
"type": "object",
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "User Profile Record",
"$id": "https://api.toolsaa.com/schemas/user-profile.json",
"description": "Draft-07 validated schema specification inferred from user payload",
"properties": {
"id": {
"type": "string",
"format": "uuid",
"description": "Unique machine-readable identifier for this resource."
},
"username": {
"type": "string",
"description": "Unique account handle or username."
},
"email": {
"type": "string",
"format": "email",
"description": "Verified contact electronic mail address."
},
"isActive": {
"type": "boolean",
"description": "Boolean toggle indicating if entity is presently active."
},
"age": {
"type": "integer",
"description": "The age associated with this record."
},
"creditBalance": {
"type": "number",
"description": "The credit balance associated with this record."
},
"website": {
"type": "string",
"format": "uri",
"description": "Public web homepage or portal destination link."
},
"createdAt": {
"type": "string",
"format": "date-time",
"description": "ISO 8601 timestamp representing initial creation date."
},
"lastLoginIp": {
"type": "string",
"format": "ipv4",
"description": "The last login ip associated with this record."
},
"roles": {
"type": "array",
"description": "The roles associated with this record.",
"items": {
"type": "string",
"description": "The roles item associated with this record."
}
},
"address": {
"type": "object",
"description": "Physical geographical location or mailing destination.",
"properties": {
"street": {
"type": "string",
"description": "The street associated with this record."
},
"city": {
"type": "string",
"description": "The city associated with this record."
},
"postalCode": {
"type": "string",
"description": "The postal code associated with this record."
},
"country": {
"type": "string",
"description": "The country associated with this record."
},
"isPrimary": {
"type": "boolean",
"description": "The is primary associated with this record."
}
},
"required": [
"street",
"city",
"postalCode",
"country",
"isPrimary"
],
"additionalProperties": false
},
"metadata": {
"type": "object",
"description": "The metadata associated with this record.",
"properties": {
"department": {
"type": "string",
"description": "The department associated with this record."
},
"clearanceLevel": {
"type": "integer",
"description": "The clearance level associated with this record."
},
"onboardingCompleted": {
"type": "boolean",
"description": "The onboarding completed associated with this record."
}
},
"required": [
"department",
"clearanceLevel",
"onboardingCompleted"
],
"additionalProperties": false
}
},
"required": [
"id",
"username",
"email",
"isActive",
"age",
"creditBalance",
"website",
"createdAt",
"lastLoginIp",
"roles",
"address",
"metadata"
],
"additionalProperties": false
}Cero infracciones del esquema Draft-07 encontradas
Modifique campos a la izquierda o haga clic arriba para inyectar errores y ver el resultado.
export interface UserProfileRecord {
/** Unique machine-readable identifier for this resource. */
id: string;
/** Unique account handle or username. */
username: string;
/** Verified contact electronic mail address. */
email: string;
/** Boolean toggle indicating if entity is presently active. */
isActive: boolean;
/** The age associated with this record. */
age: number;
/** The credit balance associated with this record. */
creditBalance: number;
/** Public web homepage or portal destination link. */
website: string;
/** ISO 8601 timestamp representing initial creation date. */
createdAt: string;
/** The last login ip associated with this record. */
lastLoginIp: string;
/** The roles associated with this record. */
roles: string[];
/** Physical geographical location or mailing destination. */
address: Address;
/** The metadata associated with this record. */
metadata: Metadata;
}
export interface Address {
/** The street associated with this record. */
street: string;
/** The city associated with this record. */
city: string;
/** The postal code associated with this record. */
postalCode: string;
/** The country associated with this record. */
country: string;
/** The is primary associated with this record. */
isPrimary: boolean;
}
export interface Metadata {
/** The department associated with this record. */
department: string;
/** The clearance level associated with this record. */
clearanceLevel: number;
/** The onboarding completed associated with this record. */
onboardingCompleted: boolean;
}Ejecución Local de Conocimiento Cero
Todo el procesamiento y conversión se realiza íntegramente en la memoria de su navegador sin transmisiones externas.
Motor Reactivo de Submilisegundos
Procesamiento inmediato en tiempo real con cada pulsación de tecla, sin latencia de red ni bloqueos.
Conformidad con Estándares Oficiales
Valida sintaxis, formato y casos límite según especificaciones oficiales para uso en producción.
Generador y Validador de JSON Schema (Draft-07) Cheatsheet
Referencia exhaustiva y motor de inferencia para esquemas JSON Schema Draft-07 y 2020-12. Detección automática de formatos semánticos y tipos TypeScript.
Parámetros clave y controles
| Parámetro | Tipo / Unidad | Descripción | Por defecto |
|---|---|---|---|
| dialect | string | Dialecto de especificación objetivo (draft-07, draft-04, 2020-12). | draft-07 |
| requiredPolicy | string | Estrategia para campos requeridos (all, none, common). | all |
| detectFormats | boolean | Detección semántica de fechas, emails, UUIDs y URLs. | true |
| strictAdditionalProperties | boolean | Establece additionalProperties: false explícitamente. | false |
Consejos profesionales y mejores prácticas
Draft-07 es la versión estándar en Ajv (Node.js), Python jsonschema y OpenAPI 3.0.
Copia las interfaces tipadas generadas para sincronizar modelos frontend y backend.
Prueba casos de borde contra el esquema recién creado en la pestaña Validador.
Problemas comunes y soluciones
⚠️Tipos mixtos en matrices
Si los elementos del array difieren, se generará una unión de tipos. Normaliza la muestra de datos.
⚠️Formato de fecha no detectado
Asegúrate de que las fechas sigan la norma ISO 8601 (YYYY-MM-DDTHH:mm:ssZ).
Preguntas frecuentes (FAQ)
¿Qué versiones de JSON Schema son compatibles?▼
Draft-07, Draft-04, Draft-06 y Draft 2020-12.
¿Es compatible directamente con Ajv?▼
Sí, se compila sin errores mediante new Ajv().compile(schema).
¿Mis datos se envían a servidores externos?▼
No. Toda la inferencia se procesa localmente en tu navegador.
¿Qué formatos de cadena detecta?▼
date-time, email, uri, uuid, ipv4, ipv6 y tipos enteros (integer).
Herramientas y utilidades relacionadas
Todas las herramientas →Transforme interfaces, tipos y comentarios JSDoc de TypeScript en esquemas JSON Schema estándar para contratos de API y formularios.
Formatea, valida y repara JSON al instante: corrige sintaxis, añade comillas, minifica e inspecciona el árbol AST en local.
Infiera estructuras de esquemas XML (XSD), elementos complejos, atributos y reglas minOccurs/maxOccurs a partir de muestras JSON.
Infiere y convierte objetos JSON en esquema de tabla BigQuery de Google Cloud con modo RECORD, STRING, INTEGER, NUMERIC y TIMESTAMP.
Convierte definiciones de esquema GraphQL (SDL) en JSON Schema (Draft 2020-12 / Draft-07) y OpenAPI 3.0 / 3.1 con soporte estricto de nulabilidad y resolución de referencias.
Transforme estructuras JSON en interfaces o alias de tipo TypeScript limpios y fuertemente tipados con inferencia automática de objetos anidados.