{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://www.calculatorx.com/schemas/math.prime_factorization/1.0.1/input.json",
  "title": "Prime factorization — input",
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "mode": {
      "enum": [
        "factorize",
        "factorisation",
        "factors",
        "factor",
        "is_prime",
        "is-prime",
        "prime",
        "primality"
      ]
    },
    "n": {
      "anyOf": [
        {
          "type": "integer",
          "minimum": 1,
          "maximum": 1000000000000
        },
        {
          "type": "string",
          "maxLength": 512,
          "pattern": "^\\s*-?[0-9]{1,13}\\s*$"
        }
      ]
    },
    "nInput": {
      "anyOf": [
        {
          "type": "integer",
          "minimum": 1,
          "maximum": 1000000000000
        },
        {
          "type": "string",
          "maxLength": 512,
          "pattern": "^\\s*-?[0-9]{1,13}\\s*$"
        }
      ]
    }
  },
  "anyOf": [
    {
      "required": [
        "n"
      ]
    },
    {
      "required": [
        "nInput"
      ]
    }
  ],
  "description": "Raw safe JSON integer or integer digit string,1<=n<=10^12,13 digits/512 characters maximum. Matching n/nInput aliases required; unknown keys, null, bool and nested values reject. Strings reject decimal/scientific syntax. JSON numeric inputs follow the published binary64 transport policy. Runtime validates numeric range and alias agreement. (calculation_version 1.0.1)"
}
