Converting Omeka S JSON-LD in HTML

I’m new to Omeka S but believed that I could, as with other forms of JSON, fetch the schema in Javascript parse it, and then covert that parsed data into HTML. Before doing this I tested the schema that’s been created for the project I’m on with Google’s Structured Data Tool (https://search.google.com/structured-data/testing-tool/u/0/) and found that @context: “https://umisarchive.ac.lsa.umich.edu/api-context” was considered an invalid type. Consequently, as a newbie, I’m not sure what to do about it. Once I get over the hump of this invalid type I believe I can do this conversion using some vanilla Javascript. Are there any ideas why this may be an issue and any recommendations on overcoming it?

To further explain, the goal is to use our Omeka S instance as an academic repository but serve up its content elsewhere either via a fetch of the contents of the JSON. If there is no simple solution I’m willing to recreate the references via copy and paste if necessary.

Omeka S should publish valid JSON-LD. The specification allows referencing a context with a URL. You’re likely seeing that error because the service cannot resolve the URL https://umisarchive.ac.lsa.umich.edu/api-context.

Thank you. Yes, this was a CORS issue, and hadn’t realized it at the time. The real difficulty I’ve been having as someone new to this is traversing the JSON-LD file to get to the nested key:value pairs that are within it. Most examples I’ve seen are of nested JSON files that are structured along the lines of “pet:cat”: {“breed”:“siamese”}. But with the “special” characters like “@key” {“some:thing”} or “key:key” I’m simply unable to get to what I need. I’ve attempted using [“key:key”] but I’m still unable to get the nested values. I’m about ready to pull my hair out of my head because everything I’ve found is so close to what I need it terms of structuring my nascent JS but I’m missing just that little thing to retrieve the whole data set or individual subsets within.

This topic was automatically closed 250 days after the last reply. New replies are no longer allowed.