Skip to content
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

Dealing with ordered lists #22

Closed
proycon opened this issue Aug 25, 2022 · 1 comment
Closed

Dealing with ordered lists #22

proycon opened this issue Aug 25, 2022 · 1 comment
Assignees
Labels
enhancement New feature or request ready Done/implemented, but release still pending

Comments

@proycon
Copy link
Owner

proycon commented Aug 25, 2022

People express authors as lists in JSON-LD but if this is done without the @list semantics (or without schema:position), the order remains undefined in RDF (unlike in JSON itself). We currently support schema:position in codemetapy but we may want actual support for@list so people can express for instance authorship like:

"author": [ "First Author", "Second Author" ]

This is in line with discussions in codemeta/codemeta#272 . The codemeta context indeed has "@container": "@list" for things like properties like author, as discussed in that issue. In our current implementation, however, we explicitly load (and even forcibly inject) the whole schema.org context as well, after the codemeta one, and the regular schema.org context does not use "@container": "@list".

@proycon proycon self-assigned this Aug 25, 2022
@proycon proycon added the enhancement New feature or request label Sep 1, 2022
proycon added a commit that referenced this issue Sep 12, 2022
…/schema:identifier if schema:position is not used (#26)

it still need to be investigated whether this may conflict with actual rdf lists (rdf:first, rdf:next), for which support is currently not implemented (#22)
proycon added a commit that referenced this issue Oct 14, 2022
@proycon proycon added the ready Done/implemented, but release still pending label Oct 17, 2022
@proycon
Copy link
Owner Author

proycon commented Oct 17, 2022

I implemented this, we force "@container": "@list" in the context internally for schema:author and schema:contributor, so these will always be interpreter as ordered lists. We do not explicitly output this deviant context in the serialisation, however (but the json-ld output will be serialised in the proper order).

@proycon proycon closed this as completed Oct 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request ready Done/implemented, but release still pending
Projects
None yet
Development

No branches or pull requests

1 participant