{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://w3id.org/moochub/4.0.0/schemas/textObject.json",
  "title": "Formatted text object",
  "description": "A formatted text representation. The content must be processed according to encodingFormat before it is displayed by a client.",
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "id": {
      "$ref": "https://w3id.org/moochub/4.0.0/schemas/id.json"
    },
    "type": {
      "const": "TextObject"
    },
    "text": {
      "type": "string"
    },
    "inLanguage": {
      "type": "string",
      "pattern": "^[A-Za-z]{2,3}(?:-[A-Za-z0-9]{2,8})*$"
    },
    "encodingFormat": {
      "enum": ["text/plain", "text/html", "text/markdown"]
    }
  },
  "required": ["type", "text", "inLanguage", "encodingFormat"]
}
