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

JSON-LD export does not round trip through Import with repeated nodes #4563

Closed
azaroth42 opened this issue Feb 14, 2019 · 2 comments
Closed
Labels
Audience: Developer The audience for the issue is a software developer Priority: Low Subject: Import/Export Subject: JSON-LD Type: Bug Something isn't working

Comments

@azaroth42
Copy link
Collaborator

Describe the bug

Due to the framing algorithm used to turn the graph into JSON-LD, when a node in the graph appears multiple times, such as when a Concept is used in multiple places, the full information is only serialized once.

So the export comes out as:

"dimension":  [
{
  "classified_as": [{"id": "http://vocab.getty.edu/aat/300055647", "label": "width", "type": "Type"}], 
  "id": "http://localhost:8000/tile/84153f9b-60b6-4a87-aefe-a5d57a60b1f0/node/1e5ddc21-2e44-11e9-9c6a-a4d18cec433a", 
  "type": "Dimension",
  "unit": "http://vocab.getty.edu/aat/300379098", 
  "value": 20}, 
{
  "classified_as": [{"id": "http://vocab.getty.edu/aat/300055644", "label": "height", "type": "Type"}], 
  "id": "http://localhost:8000/tile/deb515ff-a9e9-437e-bfb6-a11af32cbbfc/node/1e5ddc21-2e44-11e9-9c6a-a4d18cec433a", 
  "type": "Dimension", 
  "unit": {"id": "http://vocab.getty.edu/aat/300379098", "label": "centimeters", "type": "MeasurementUnit"}, 
  "value": 10}
],

But the import expects the unit to have the same construction in both cases.

This matters if you want to take data out and put it back in again, or if you are writing an API consumer that expects it always to have the same construction. Both of which we intend to do, but not next week :)

In the JSON-LD 1.1 working group, this may be solved by at least one of three feature requests:

At which point the frame can be written and the development cost handed off to the PyLD library.

@azaroth42
Copy link
Collaborator Author

The feature in JSON-LD 1.1 was deferred for a future version :( Still a problem but unlikely to be solved without some explicit customization of the JSON after producing it from the graph.

@apeters
Copy link
Member

apeters commented Aug 12, 2021

fixed by #7546

@apeters apeters closed this as completed Aug 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Audience: Developer The audience for the issue is a software developer Priority: Low Subject: Import/Export Subject: JSON-LD Type: Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants