Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improved handling of custom services #55

Open
donaldgray opened this issue Nov 19, 2024 · 1 comment
Open

Improved handling of custom services #55

donaldgray opened this issue Nov 19, 2024 · 1 comment
Labels
enhancement New feature or request serialization Related to serialization / deserialization

Comments

@donaldgray
Copy link
Member

donaldgray commented Nov 19, 2024

To date iiif-net just maps the data that it's given to concrete POCOs.

However, there are example manifests that contain services that we can't yet map. ExternalService is a fallback for unknown IService items but this will only map properties on the POCO, there are examples where there are new properties. An example is from https://fromthepage.com/iiif/52425/manifest:

"service": [{
  "@context": "http://www.fromthepage.org/jsonld/1/context.json",
  "@id": "https://fromthepage.com/iiif/52425/status",
  "label": "Work Status",
  "profile": "https://github.com/benwbrum/fromthepage/wiki/FromThePage-Support-for-the-IIIF-Presentation-API-and-Web-Annotations#service",
  "pctComplete": 33.34,
  "pctTranscribed": 33.34,
  "pctOcrCorrected": 0,
  "pctIndexed": 1.25,
  "pctMarkedBlank": 1.25,
  "pctNeedsReview": 0,
  "pctTranslationComplete": 1.25,
  "pctTranslated": 1.25,
  "pctTranslationNeedsReview": 0,
  "pctTranslationIndexed": 1.25,
  "pctTranslationMarkedBlank": 1.25,
  "metadataStatus": "undescribed",
  "lastUpdated": "2024-09-05 21:34:18 UTC"
}],

How can we map these properties? Use dynamic? Or a Dictionary<string, object>? Or a JObject? With each of these approaches - how would that look when constructing a service in code, rather than just deserializing.

Should we be more JSON-LD aware and consult @context before deserializing?

@donaldgray donaldgray added serialization Related to serialization / deserialization enhancement New feature or request labels Nov 19, 2024
@donaldgray
Copy link
Member Author

JSON-LD mentioned in description, dropping https://dotnetrdf.org/ for possible consideration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request serialization Related to serialization / deserialization
Projects
None yet
Development

No branches or pull requests

1 participant