digirati-co-uk / iiif-net

IIIF models for dotnet
MIT License
3 stars 1 forks source link

Support inline annotation body deserialisation #56

Open donaldgray opened 6 days ago

donaldgray commented 6 days ago

Inline-annotation bodies are being lost on deserialisation. E.g. a manifest with

"items": [{
  "annotations": [{
    "id": "https://example/annopage/p1",
    "type": "AnnotationPage",
    "items": [{
      "id": "https://example/annopage/p1/a1",
      "type": "Annotation",
      "motivation": "describing",
      "body": {
        "type": "TextualBody",
        "value": "something",
        "format": "text/html"
      },
      "target": {
        "id": "https:/example/canvas/c0#xywh=1800,2000,500,500",
        "type": "Canvas"
    }

currently results in the body being completely lost and target is link only (verify - is this okay)?:

"items": [{
  "annotations": [{
    "id": "https://example/annopage/p1",
    "type": "AnnotationPage",
    "items": [{
      "id": "https://example/annopage/p1/a1",
      "type": "Annotation",
      "motivation": "describing",
      "target": "https://example/canvas/c0#xywh=1800,2000,500,500"
  },

Above example is taken from https://stephenwf.github.io/ocean-liners.json