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

Compaction algorithm doesn't compact properties with { "@type": "@id" } specified in context #20

Closed
goofballLogic opened this issue Jan 10, 2018 · 8 comments
Labels

Comments

@goofballLogic
Copy link
Member

Given

{
  "@context": {
    "@vocab": "http://test.com/",
    "stuff": { "@type": "@id" }
  }
}

when I compact the document:

{
   "http://test.com/stuff": { "@id": "some/stuff" }
}

I believe I should get:

{
  "stuff": "some/stuff"
}

This matches the playground output on the JSON-LD site: https://json-ld.org/playground/#/gist/c01a7b032f191afc9034c307caf17a61

The value compaction algorithm: (6.5.2 Algorithm, 4.1: https://json-ld.org/spec/latest/json-ld-api/#algorithm-8, retrieved 2018-01-10) says:

If number members is 1 and the type mapping of active property is set to @id, return the result of using the IRI compaction algorithm, passing active context, inverse context, and the value of the @id member for iri.

However, json-ld.net instead returns:

{
  "stuff": {
    "@id": "/some/stuff"
  }
}
@goofballLogic
Copy link
Member Author

Are you accepting pull requests for this? Do you need new maintainers?

@emgarten
Copy link
Contributor

A PR for this would be great. This project hasn't had a lot of attention lately, but I can help you get the changes in.

@goofballLogic
Copy link
Member Author

Sorry to swamp you with issues today @emgarten but I would like to help resolve at least the ones I've created. I have put a PR in and have another one or two which I can send in whatever form/schedule is easiest for you to receive.

@stale
Copy link

stale bot commented May 4, 2020

This issue has been automatically marked as stale because it has not had recent activity. After 30 days from now, it will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label May 4, 2020
@stale stale bot closed this as completed Jun 3, 2020
@goofballLogic
Copy link
Member Author

Reopening this as part of #60

@goofballLogic goofballLogic reopened this Jul 2, 2020
@stale stale bot removed the stale label Jul 2, 2020
@stale
Copy link

stale bot commented Sep 30, 2020

This issue has been automatically marked as stale because it has not had recent activity. After 30 days from now, it will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Sep 30, 2020
@goofballLogic
Copy link
Member Author

dependent on pending issues

@stale stale bot removed the stale label Sep 30, 2020
@stale
Copy link

stale bot commented Dec 29, 2020

This issue has been automatically marked as stale because it has not had recent activity. After 30 days from now, it will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Dec 29, 2020
@stale stale bot closed this as completed Jan 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants