JSON a JSON SchemaDraft-07

Generador y Validador de JSON Schema (Draft-07)

Funciona sin conexión

Infiere 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.

Carga útil JSON de entrada633 chars
Objeto JSON válido
100% calculado en la memoria del navegador
{
  "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
}
Properties: 20Required: 20Depth: 3Formats: 5
Conforme con Draft-07

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.

Referencia técnica y guía de arquitectura

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.

Generador y Validador de JSON Schema (Draft-07) Cheatsheet — Arquitectura en memoria del lado del cliente y flujo de datos
Generador y Validador de JSON Schema (Draft-07) Cheatsheet — Arquitectura en memoria del lado del cliente y flujo de datos

Parámetros clave y controles

Parámetros clave y controles
ParámetroTipo / UnidadDescripciónPor defecto
dialectstringDialecto de especificación objetivo (draft-07, draft-04, 2020-12).draft-07
requiredPolicystringEstrategia para campos requeridos (all, none, common).all
detectFormatsbooleanDetección semántica de fechas, emails, UUIDs y URLs.true
strictAdditionalPropertiesbooleanEstablece additionalProperties: false explícitamente.false

Consejos profesionales y mejores prácticas

Compatibilidad universal de Draft-07

Draft-07 es la versión estándar en Ajv (Node.js), Python jsonschema y OpenAPI 3.0.

Exportación a TypeScript

Copia las interfaces tipadas generadas para sincronizar modelos frontend y backend.

Validación interactiva

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).