{
  "$schema": "http://json-schema.org/draft/2020-12/schema",
  "$id": "https://schemas.mpai.community/OSD/V1.4/data/Object.json",
  "title": "Object",
  "type": "object", "properties": { 
    "Header": { "type": "string", "pattern": "^OSD-OBJ-V[0-9]{1,2}[.][0-9]{1,2}$" },
    "MInstanceID": { "type": "string" },
    "ObjectID": { "type": "string" },
    "ObjectSpaceTime": { "$ref": "https://schemas.mpai.community/OSD/V1.4/data/SpaceTime.json" },
    "BasicObjectCount": { "type": "integer" },
    "BasicObjects": { "type": "array", "items": { "type": "object", "properties": {
      "BasicObjectSpaceTime": { "$ref": "https://schemas.mpai.community/OSD/V1.4/data/SpaceTime.json" },
      "BasicObjectIDOrBasicObject": { "type": "array", "items": { "anyOf": [
        { "type": "object", "properties": { "BasicObject": { "$ref": "https://schemas.mpai.community/OSD/V1.4/data/BasicObject.json" } } },
        { "type": "object", "properties": { "BasicObjectID": { "type": "string" } } } ] } },
      "ObjectAnnotation": { "type": "array", "items": { "type": "object", "properties": {
        "Annotation": { "$ref": "https://schemas.mpai.community/OSD/V1.4/data/Annotation.json" },
        "AnnotationTimeSpace": { "$ref": "https://schemas.mpai.community/OSD/V1.4/data/SpaceTime.json" },
          "RightsIDOrRights": { "type": "array", "items": { "anyOf": [
            { "type": "object", "properties": { "ObjectRights": { "$ref": "https://schemas.mpai.community/MMM4/V2.1/data/Rights.json" } } },
            { "type": "object", "properties": { "RightsID": { "type": "string" } } } ] } } } } } } } },
    "SubObjectCount": { "type": "integer" },
    "SubObjects": { "type": "array", "items": { "type": "object", "properties": {
      "SubObjectSpaceTime": { "$ref": "https://schemas.mpai.community/OSD/V1.4/data/SpaceTime.json" },
      "SubObjectIDOrSubObject": { "type": "array", "items": { "anyOf": [
        { "type": "object", "properties": { "SubObject": { "$ref": "https://schemas.mpai.community/OSD/V1.4/data/Object.json" } } },
        { "type": "object", "properties": { "SubObjectID": { "type": "string" }}}]}},
      "ObjectAnnotations": { "type": "array", "items": { "type": "object", "properties": {
        "Annotation": { "$ref": "https://schemas.mpai.community/OSD/V1.4/data/Annotation.json" },
        "AnnotationTimeSpace": { "$ref": "https://schemas.mpai.community/OSD/V1.4/data/SpaceTime.json" },
          "AnnotationRightsIDOrRights": { "type": "array", "items": { "anyOf": [
            { "type": "object", "properties": { "Rights": { "$ref": "https://schemas.mpai.community/MMM4/V2.1/data/Rights.json"  } } },
            { "type": "object", "properties": { "RightsID": { "type": "string" } } } ] } } } } } } } },
    "ObjectOrBasicObject": { "type": "array", "items": { "oneOf": [
      { "type": "array", "items": { "$ref": "https://schemas.mpai.community/OSD/V1.4/data/BasicObject.json" } },
      { "type": "array", "items": { "$ref": "https://schemas.mpai.community/OSD/V1.4/data/Object.json#/properties/ObjectOrBasicObject" } } ] } },
    "ObjectRights": { "$ref": "https://schemas.mpai.community/MMM4/V2.0/data/Rights.json" },
    "DescrMetadata": { "type": "string" } }
}