{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://schemas.mpai.community/MMC/V2.2/data/TextObject.json",
  "title": "TextObject",
  "type": "object",
  "properties": {
    "Header": {
      "type": "string",
      "pattern": "^MMC-TXO-V[0-9]{1,2}[.][0-9]{1,2}$"
    },
    "MInstanceID": {
      "type": "string"
    },
    "TextObjectID": {
      "type": "string"
    },
    "TextObjectQualifier": {
      "$ref": "https://schemas.mpai.community/TFA/V1.0/data/TextQualifier.json"
    },
    "TextObjectSpaceTime": {
      "$ref": "https://schemas.mpai.community/OSD/V1.1/data/SpaceTime.json"
    },
    "TextObjectData": {
      "type": "object",
      "properties": {
        "TextStringOrTextData": {
          "type": "array",
          "items": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "TextString": {
                    "type": "string"
                  }
                }
              },
              {
                "type": "object",
                "properties": {
                  "TextData": {
                    "type": "object",
                    "items": {
                      "TextDataPayloadLength": {
                        "type": "integer"
                      },
                      "TextDataPayloadURI": {
                        "type": "string",
                        "format": "uri"
                      }
                    }
                  }
                }
              }
            ]
          }
        }
      }
    },
    "DescrMetadata": {
      "type": "string"
    }
  }
}