gs1 / EPCIS

Draft files being shared for EPCIS 2.0 development
Other
22 stars 7 forks source link

Should we register a JSON-LD Profile for EPCIS (or a MIME Type)? #168

Open jmcanterafonseca-iota opened 3 years ago

jmcanterafonseca-iota commented 3 years ago

The JSON-LD specification allows the definition of profiles associated to JSON-LD Content

https://www.w3.org/TR/json-ld11/#iana-considerations

Should we define a profile for EPCIS 2.0?

On the other hand it seems there are ongoing discussions with IETF on the possibility to allow registration of media types with multiple suffixes, see https://www.w3.org/TR/did-core/#application-did-ld-json which would allow to register application/epcis+ld+json ...

jmcanterafonseca-iota commented 3 years ago

Somewhat the above could allow to get rid of the schemaVersion in EPCIS Document.

mgh128 commented 3 years ago

I can see the use of profiles to express preferences for a particular framing of JSON-LD. I'm struggling with the idea of going so far as to define a media type for EPCIS data in JSON-LD format. The need to negotiate on schema version exists across all of our data bindings (XML, JSON / JSON-LD) so I don't think we should rely on a feature that might be specific to JSON-LD to achieve this.

CraigRe commented 3 years ago

@jmcanterafonseca-iota can you explain your rationale?

VladimirAlexiev commented 3 years ago
  1. Profiles are used to distinguish between versions, variants, or conformance levels of the same specification. See https://www.w3.org/TR/dx-prof, https://www.w3.org/TR/dx-prof-conneg/. I think we should register one or more EPCIS profiles (eg for 1.2 and 2.0)
  2. IMHO https://w3.org/TR/json-ld11/#iana-considerations is not relevant because we have a strict JSON schema that does not allow different kinds of framing.
  3. Yes, the EPCIS version can be communicated in the request and response headers (see dx-conneg), so schemaVersion could be omitted from the doc. But I think XML people especially prefer to see it in the doc.
  4. Profiles are orthogonal to content types, and are not specific to JSON-LD nor semantic web.

I think profiles are relevant for EPCIS because they allow the client to request different versions or variants/extensions, and for the server to identify what they are returning. This will be especially useful for industry-specific extensions, eg EPCIS for Rail.

Currently how can an XML document say "hi, I use EPCIS extensions for Rail"? Through its namespace and schema declarations?

VladimirAlexiev commented 3 years ago

267 is vaguely related. MIME types play in "conneg" (content negotiation):

Profiles play in https://www.w3.org/TR/dx-prof-conneg/ :

mgh128 commented 3 years ago

Not yet addressed in public review drafts for EPCIS / CBV 2.0 but noted in a public review comment as an unaddressed item that should be discussed and potentially mentioned in section 12.3 of EPCIS.