learningtapestry / metadataregistry

DEPRECATED - THIS CODE BASE IS NO LONGER MAINTAINED. Metadata Registry
Apache License 2.0
7 stars 5 forks source link

Consider adding a `resource_context` field (or similar) #12

Closed science closed 8 years ago

science commented 8 years ago

One point raised on the LR call today was the difficulty in figuring out the schema (aka "context" in json-ld) of the resource data during parsing by data consumers.

If you unpack the JWT, you know you're dealing with JSON (and the resource_format tells you that too).

But you don't know what kind of JSON - is it JSON-LD? Or some other schema? It seems like we should provide an indication of what kind of schema (and specific binding/structure) is welded to the JSON resource?

One way to handle that is to provide a resource_context field or similar. This could include an array of elements maybe like the @context field in json-ld itself?. Something like the following. Describing non-json-ld contexts may be challenging here.. Worth a discussion anyway.

"resource_context": [
    {
      "@vocab": "http://schema.org/",
      "url": {
        "@type": "@id"
      }
    },
    {
      "lrmi": "http://lrmi.net/the-specification#",
      "useRightsUrl": {
        "@id": "lrmi:useRightsUrl",
        "@type": "@id"
      }
    }
]

cc @aspino

science commented 8 years ago

I think we should postpone this for now. This field could be added later or something like it once there's a demonstrated need.