{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/programmes-net/json-schema/programmes-net-base-n-encode-schema.json",
  "title": "base-n.encode",
  "description": "Encode UTF-8 text in the chosen scheme.",
  "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/base-n.encode",
  "type": "object",
  "properties": {
    "operation": {
      "const": "encode"
    },
    "input": {
      "type": "string",
      "description": "The text to encode.",
      "maxLength": 4096
    },
    "options": {
      "type": "object",
      "properties": {
        "scheme": {
          "type": "string",
          "description": "Encoding scheme.",
          "enum": [
            "base32",
            "base32hex",
            "crockford",
            "base58",
            "ascii85",
            "z85"
          ],
          "default": "base32"
        },
        "padding": {
          "type": "boolean",
          "description": "Base32/Base32hex: emit = padding.",
          "default": true
        },
        "delimiters": {
          "type": "boolean",
          "description": "Ascii85: wrap in <~ ~>.",
          "default": false
        }
      }
    }
  },
  "required": [
    "operation"
  ]
}