-
Notifications
You must be signed in to change notification settings - Fork 23
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
type coercion: coerce node types #31
Comments
You are basically proposing a means of inserting data from the context into the JSON-LD document. This was considered in json-ld/json-ld.org#426 using an The problem with re-interpreting |
There is an editorial note here that "type coercion" language in the spec is not actually what people consider as type coercion in programming. We might forestall some of these issues by changing the description of the feature. And otherwise, +1 to close wontfix. |
IMO, "type coercion" is correct, as it allows an integer |
There is also a slippery slope here, insofar as this simply duplicates an RDFS feature; after all, this type of deduction is exactly what I propose to close with wontfix. |
so what is the proposed way to process a object without type information? I guess the RDF way would be to use either RDFS or OWL to reason about the graph and infer the new triple |
@iherman this is simply a 1.0 feature that allows would would have been something like The "fix" which is asked for is to simply ensure that other places that make use of this feature reference the appropriate definition. If you find the "type coercion" terminology from 1.0 confusing, we could propose renaming it. |
Yeah. I now realize (I forgot) that JSON-LD, sort of, mashes up two notions: an RDF datatype and the type in the sense of belonging to an RDF Class. I may not like this, but that is water under the bridge now, I guess... However, I do accept that, in this sense, the original proposal is just a logical extension of a possibility that is already there. I indeed find the "type coercion" terminology confusing indeed. Whilst it makes some sense for a datatype, it is really not appropriate when I think of it as an object belonging to a class. I am not sure what to replace it; something around a neutral terminology like "setting the type" is probably better if it fits, editorially, to the context. |
Closing, won't fix. WG Resolution: https://www.w3.org/2018/json-ld-wg/Meetings/Minutes/2018/2018-07-27-json-ld#section2-1 |
I think it would be interesting to add type coercion also to node objects in JSON-LD. Consider a document like
it would be nice it I could specify in the context what the "@type" of each node referred to by the predicate "ex:thing" is in order to reduce repetitiveness. Similar how I can do it for terms pointing to literals.
Right now,
@type
seems to just be ignored when the object in the triple is not a literal -- so perhaps it is straight forward to add?expands to
while
expands to:
The text was updated successfully, but these errors were encountered: