Skip to content
This repository has been archived by the owner on Jun 29, 2022. It is now read-only.

Implicit traversal through links in dictionaries #34

Closed
bronger opened this issue Jan 14, 2017 · 5 comments
Closed

Implicit traversal through links in dictionaries #34

bronger opened this issue Jan 14, 2017 · 5 comments
Labels
status/deferred Conscious decision to pause or backlog

Comments

@bronger
Copy link

bronger commented Jan 14, 2017

I see an inconsistency in the way link within dictionaries are resolved. I may misinterpret the spec but then one should consider clarifying it (I would be happy to file a PR in this case).

I refer to https://github.com/ipld/specs/tree/master/ipld#link-properties-convention. The command ipld cat --json QmCCC...CCC/cat.jpg yields the content of cat.jpg. However, I would have expected the following output:

{
    "link": {"/": "QmCCC...222"},
    "mode": "0644",
    "owner": "jbenet"
}
@bronger
Copy link
Author

bronger commented Aug 11, 2017

Is "link" a special key in IPLD?

@Stebalien
Copy link
Contributor

You're absolutely correct, "link" is not a special key. We considered building link metadata into the spec but decided against it for simplicity; applications must decide how to store their own metadata.

Note: The "/" is a special key. That's how we encode links in JSON.

@bronger
Copy link
Author

bronger commented Aug 11, 2017

Thus, ipld cat --json QmCCC...CCC/cat.jpg is wrong and ipld cat --json QmCCC...CCC/cat.jpg/link is correct in order to get the binary content?

@Stebalien
Copy link
Contributor

Yes.

@daviddias daviddias added the status/deferred Conscious decision to pause or backlog label Mar 19, 2018
@rvagg
Copy link
Member

rvagg commented Aug 14, 2019

Closing due to staleness as per team agreement to clean up the issue tracker a bit (ipld/team-mgmt#28). This doesn't mean this issue is off the table entirely, it's just not on the current active stack but may be revisited in the near future. If you feel there is something pertinent here, please speak up, reopen, or open a new issue. [/boilerplate]

@rvagg rvagg closed this as completed Aug 14, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
status/deferred Conscious decision to pause or backlog
Projects
None yet
Development

No branches or pull requests

4 participants