-
Notifications
You must be signed in to change notification settings - Fork 157
Convert also "partial" lists from RDF to JSON-LD #277
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
Comments
I agree. I actually thought it was supposed to behave this way, so I'd certainly consider it a bug fix. (Just a detail: in the second example (how it is currently), first object, you meant "rdf:rest": "_:b0", right?) |
Yeah, you are right... stupid copy-paste error. I fixed the example. |
The @id of the first object can't be "http://example.com/", surely? To be a list, the subject must be a BNode. It also makes sense that @list can be the value of rdf:rest (and perhaps rdf:first, as well). The algorithm would find the list head at the first node having rdf:first/rest with only single well-formed values, as it does now; this should include those for which the subject is a non-well-formed value of an rdf:rest. An example @afs and I were working on offline is more like the following: Turtle:
JSON-LD:
} |
I haven't thought much about it yet but wouldn't allowing it in rdf:first mean that (without additional checks) you would end up creating list of lists? We currently keep a reference to the bnode-object that is then replaced with a
Yes, that's a consequence of allowing |
RESOLUTION: Adopt Markus' algorithmic change to convert partial lists from RDF to JSON-LD. |
The from RDF algorithm has been updated to handle "partial" lists as well. This addresses an issue the OpenAnnotation CG encountered (cc'ed). The tests have been updated and some new ones have been added. Unless I hear objections, I will therefore close this issue in 24 hours. |
_This came up in a discussion with @afs:_
On Thursday, July 04, 2013 10:21 PM, Andy Seaborne wrote:
You are of course right and the necessary changes to the algorithm should be quite small.
Currently a
@list
can never be the value of ardf:first
/rdf:rest
. This kind of ensures that only "complete" lists are transformed to@list
and that we don't produce lists of lists in JSON-LD.An example might clarify what I mean. Currently we would never produce something like
all the list bnodes would be preserved:
(edit: fixed second example)
Arguably changing that would result in a nicer result. This might also be a quite elegant solution for the OpenAnnotation people. I think we could threat this change as an algorithmic bug fix (meaning, no need for another LC).
Thoughts?
The text was updated successfully, but these errors were encountered: