Skip to content

Specify pathing into a CID vs to a CID #250

@RangerMauve

Description

@RangerMauve

Right now when you have a structure like {foo: Link} Pathing into it with /foo could either mean "get the value at foo (the link)" or "get the data pointed at by foo".

I think we should standardize around using /foo to mean "get the link" and /foo/ to mean "traverse into the link".

This applies to IPLD Patch, to IPLD URLs, and to traversal in general.

One question this raises is what to do when foo isn't a Link and someone tries to do /foo/.
Another question is how this would look when translated into path segments. Would it result in a path segment that's an empty string?

cc @rvagg on thoughts. Might be useful to formalize somewhere and make sure the JS and Go (and Rust) implementations are aligned.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    🥞 Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions