{
  "slug": "json-to-json-schema",
  "name": "gizza-ai/json-to-json-schema",
  "version": "0.1.0",
  "title": "JSON to JSON Schema Generator — gizza.ai",
  "description": "Paste JSON and get a JSON Schema — types, required fields, unions, and formats (email, uri, date-time, uuid) inferred. Draft 2020-12 or Draft-07, in-browser, free.",
  "tags": [
    "json to json schema",
    "json schema generator",
    "infer json schema",
    "schema from json",
    "draft-07",
    "draft 2020-12"
  ],
  "category": "data",
  "urls": {
    "page": "https://gizza.ai/tools/json-to-json-schema/",
    "markdown": "https://gizza.ai/tools/json-to-json-schema/index.md",
    "descriptor": "https://gizza.ai/tools/json-to-json-schema/tool.json",
    "deep_link_example": "https://gizza.ai/tools/json-to-json-schema/?json=%7B%20%22name%22%3A%20%22Ada%22%2C%20%22email%22%3A%20%22ada%40example.com%22%2C%20%22roles%22%3A%20%5B%22admin%22%5D%20%7D&draft=2020-12&additional_properties=true&required=true&detect_formats=true&title=User"
  },
  "cli": "gizza tool json-to-json-schema '{ \"name\": \"Ada\", \"email\": \"ada@example.com\", \"roles\": [\"admin\"] }'",
  "tool": {
    "description": "Infer a JSON Schema (Draft 2020-12 or Draft-07) from a pasted JSON object or array sample. Nested objects/arrays are inferred recursively; when the root (or a nested array) holds multiple elements they are merged so keys missing in some become optional and differing types become unions (e.g. [\"integer\",\"string\"]). Options: draft (2020-12 default, or draft-07), additional_properties (false default = strict, emits additionalProperties:false), required (true default, lists keys seen in all samples), detect_formats (true default, tags strings as email/uri/date-time/date/uuid/ipv4), and an optional root title. Returns the pretty-printed schema.",
    "parameters": {
      "additionalProperties": false,
      "properties": {
        "additional_properties": {
          "default": false,
          "description": "Allow properties beyond those seen. false (default) emits 'additionalProperties: false' on objects for strict validation; true omits it (permissive).",
          "type": "boolean"
        },
        "detect_formats": {
          "default": true,
          "description": "Detect string 'format' hints (email, uri, date-time, date, uuid, ipv4). Default true.",
          "type": "boolean"
        },
        "draft": {
          "default": "2020-12",
          "description": "JSON Schema dialect to emit. '2020-12' (default) or 'draft-07'. Affects the $schema URL and whether a 'uuid' format is emitted (Draft-07 has no uuid format).",
          "enum": [
            "2020-12",
            "draft-07"
          ],
          "type": "string"
        },
        "json": {
          "description": "A JSON object or array sample to infer a schema from. If the root is an array, its elements are merged so keys missing in some become optional and differing types become unions.",
          "type": "string"
        },
        "required": {
          "default": true,
          "description": "List every key present in all merged samples of an object under 'required'. Default true.",
          "type": "boolean"
        },
        "title": {
          "default": "",
          "description": "Optional 'title' for the root schema. Empty (default) omits it.",
          "type": "string"
        }
      },
      "required": [
        "json"
      ],
      "type": "object"
    }
  }
}