-
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
Use tags to distinguish "plain" YAML-LD from "idiomatic" YAML-LD #6
Comments
A concrete proposal in that direction would be to use a tag at the top-level of any "idiomatic" YAML-LD document, applying to the whole object/array that makes the document. !yaml-ld
$context: http://schema.org/
$type: Person
name: Pierre-Antoine Champin I consider that the extra effort to put the tag is low enough. |
|
because
I successfully parsed it with ruamel.yaml. |
I think quoting is less problematic than changing parsers :)
Processing it differently depending on the media type or the file extension |
I am uncertain whether it is beneficial to have two dialects of the same language which might potentially diverge, wreak havoc and feed misunderstanding. However, let us assume we would want that. If we would agree that the Which of the two use cases (with conversion versus without conversion) would we see in practice more often? I feel we might want to keep the most prevalent use case as is and perhaps specially mark the use cases which are not used as often. Thus we would reduce the typing burden and the syntactic noise. I have added some thoughts about this in #11. |
I don't want to avoid it, but I want to ensure that
I totally sympathize with this fear, and that's precisely why I defend A subset of YAML can be seen as sharing the same data model as JSON, therefore both can be seen as "two dialects of the same language" (this is my rationale in #12, by the way). For all YAML-LD document that fall into that subset, I therefore think it much better to ensure that they behave the same as the equivalent JSON-LD document. YAML-LD document using features that are not supported by JSON give us room for extensibility (in particular, improving the user-experience of authoring YAML-LD from scratch). Tags are such a feature, hence the proposal in this issue. |
Perhaps the introduction of a special $-aware context would resolve this once and for all — and with JSON-LD own means. Except for |
By "plain" YAML-LD, I mean "YAML-LD documents that can be interpreted as Linked Data by simply converting them to JSON, then processing them with a standard JSON-LD processor.
By "idiomatic" YAML-LD, I mean "YAML-LD documents that are easier to author, but require some specific processing steps to be interpreted as Linked Data". An example of such additional processing step would be the conversion of
$
-keywords into standard@
-keywords (as discuseed in #3).Tags are a feature of YAML that has no correspondance in JSON, so their presence mechanically requires additional processing. I suggest that
The first proposal I made in that direction is too much error prone. However, I think the general design principle deserves to be explored further.
The text was updated successfully, but these errors were encountered: