-
Notifications
You must be signed in to change notification settings - Fork 8
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
YAML-LD UCRs #2
Comments
While working on +yaml media type definition for expressing json files (openapi+yaml, ld+yaml, ..) we provided some interoperability considerations in https://ietf-wg-httpapi.github.io/mediatypes/draft-ietf-httpapi-yaml-mediatypes.html We are engaging with YAML community via https://app.element.io/#/room/#chat-mediatype:yaml.io and it could be useful to discuss specific points together. |
We generate JSON-LD contexts from Open API Specifications in YAML here: https://w3c-ccg.github.io/traceability-vocab/openapi/ For example: We invented a syntax for describing JSON-LD terms in JSON-Schema: $linkedData:
term: AgActivity
'@id': https://w3id.org/traceability#AgActivity
title: Agricultural Activity This allowed us to define an RDF type and a JSON Schema type in the same file, which helps us keep semantics and security in sync. |
OT: @OR13 we are working on similar stuff, but with a different syntax after some analysis since we need to be compatible with OAS3.0 ( |
The semantics of ShEx is defined in terms of its JSON(-LD) representation (e.g. value sets). I've so far relied on js-yaml to have the one true mapping from JSON to YAML in lirbaries like ShapePath. We'd brought up the idea of a YAML representation (which would, of course, be named "ShExY"), but since the translation was so trivial, we never found conflicts between the ways we wrote or interpreted ShExY. That said, if JSON-LD defined this, there'd be no need. |
Sounds like we have a few different things happening:
(I think 3 might be a bit more different than 1 and 2). I will elaborate a bit more on the why "why". Most of the JSON-LD contexts we've seen have gotten really, really large... that made them really hard to maintain / test. We set out to be able to test each RDF Type independently, and using JSON Schema as the base, since folks are used to composing JSON Schemas to manage complexity. As a side effect, this allowed us to compose JSON Schemas to manage context complexity. I suppose there are other tools we could have used to do this, but we picked OAS and JSON Schema because of their appeal to "non linked data people"... we've observed there are a lot off folks that stumble when they first encounter JSON-LD, we thought it would be good to give them smaller building blocks that were more familiar to them. |
I think that since YAML 1.2 flow serialization "seems" JSON, it is almost impossible to define an ld+yaml that does behave in a different way from what the general audie ance expects. Probably the only extension points (which do not have a JSON counterpart) are:
In general, I think that interoperability should be a concern since many implementations prefer serializing everything to JSON to avoid managing cyclic graph processing issues et al at runtime. |
Repo has be set up at https://github.com/json-ld/yaml-ld. If you would like to contribute, and are a member of the JSON-LD Community Group I can add you to the contributors team. Please create an issue (or respond to an already existing issue) to be added to the team. |
Moving this issue to the yaml-ld repo. |
Primary reason I am interested in YAML-LD is small, composable, human readable RDF definitions for the modern era. Compatibility with JSON-LD is good, but I think we should be wary of giving YAML-LD the same amount of rope that JSON-LD supports, and we should make sure that all the benefits of YAML are available to RDF, not just the parts of YAML that translate directly to JSON. |
@VladimirAlexiev , https://github.com/hapifhir/hapi-fhir is a prominent open-source Java server. As you osberved, there's no FHIR/YAML (though we make use of it in the build process). I'll delete this comment once you ack it. |
@ericprud acked but why delete? Cheers! |
@gkellogg Can we use this issue somehow to track the completeness of #37?
|
@VladimirAlexiev I think as of now it would be useful to complete a first draft and start closing some issues. Without a document stub, other folks cannot understand what we are doing. With the "profiling" idea we will be able to accomodate more and more use cases #35 |
As this issue is closed, probably not the best place to track anything. If you want to use this use case for tracking milestones, then it should be re-opened. Or, we should look into GitHub Milestones.
PR #37 is just a point in time, more use cases will certainly be forthcoming, and we'll need to figure out how to reconcile conflicting use cases. Presumably, the "Requirements" part of UCR should describe how the spec should address a given use case, of if the use case has been rejected. |
Create two milestones: -00 and -future |
Related to w3c/json-ld-syntax#389, #3.
TODO: scan these issues to extract more requirements.
Like any great W3C work, we should start with a Use Case Requirements specification / collection.
Until we have a repo (@gkellogg) where we can collect UCR per issue, let's use the following format. It could help UCR editors collect the issues:
Notes:
Here we go
MUST: Least Surprise (@pchampin)
MUST: Human Readability (@anatoly-scherbakov)
$
instead of@
)MUST: Compatibility (@gkellogg)
$
sigil ("namespace") will overlap with other existing uses. For example, JSON Schema has$schema, $vocabulary
and other other keywords that would not overlap with the JSON-LD keyword namespace (that uses the@
sigil)SHOULD: YAML Intro (@VladimirAlexiev)
SHOULD: Archetypical Examples (@VladimirAlexiev)
SHOULD: Shortcuts (@VladimirAlexiev)
←
forrdfs:domain
and→
forrdfs:range
(@anatoly-scherbakov)COULD: Versions (@VladimirAlexiev)
SHOULD: Extensions (@VladimirAlexiev)
The YAML 1.1 specification was published in 2005. Around this time, the developers became aware of JSON. By sheer coincidence, JSON was almost a complete subset of YAML (both syntactically and semantically). The YAML 1.2 specification was published in 2009. Its primary focus was making YAML a strict superset of JSON".
Tags are comparable to datatypes YAML-LD datatypes (and tags for datatypes) #17.
-.inf
and.nan
).12345678901234567890.12345
is converted to RDF literal"12345678901234567168"^^xsd:integer
(see jsonld playground)@type
, egCOULD: Polyglot Modeling Polyglot Modeling #19
w3c-ccg
@OR13 @nissimsan @msporny)Conformance Tests #20
SHOULD YAML presentation ("cosmetic") controls #42
MUST YAML-LD canonicalization (c14n) #43
The text was updated successfully, but these errors were encountered: