{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/programmes-net/json-schema/programmes-net-html-entity-encode-schema.json",
  "title": "html-entity.encode",
  "description": "Encode text into HTML entities.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/programmes-net-encoders-decoders-api-openapi.yml#/components/schemas/html-entity.encode",
  "type": "object",
  "properties": {
    "operation": {
      "const": "encode"
    },
    "input": {
      "type": "string",
      "description": "The text to encode.",
      "maxLength": 32768
    },
    "options": {
      "type": "object",
      "properties": {
        "format": {
          "type": "string",
          "description": "Output entity format.",
          "enum": [
            "named",
            "decimal",
            "hex"
          ],
          "default": "named"
        },
        "encodeAll": {
          "type": "boolean",
          "description": "Encode every character.",
          "default": false
        },
        "preferNamed": {
          "type": "boolean",
          "description": "Prefer a named entity when one exists.",
          "default": true
        }
      }
    }
  },
  "required": [
    "operation"
  ]
}