-
Notifications
You must be signed in to change notification settings - Fork 2
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
bytes & link representation in the policy #4
Comments
Pasting my response from the othre thread
Can we restrict literals to just scalars ? I think it will get hairy otherwise especially if we start extending syntax in the future.
After some implementation experiments I came out with an opinion that I would like to have more clear way to signal whether selection should return one result or many. If you have I think it would be less ambiguous to have JSON pointer selectors and then clause like It isn't a strongly held opinion, but so far I find it explicit
I think I we need to support bytes natively. We do not use JSON in our UCANs, but rather use a DAG-CBOR which has native support for bytes. I can imagine expressions around byte prefixes / slices and having to deal with base64 string would be awkward. I think in case of JSON bytes could simply be represented by arrays of bytes. Although in literals I would support idea of using I have less strong opinions about links. Still I would prefer if representation was base encoding agnostic that is to say |
Yep same here. I don't want to convert to dag-json and downcast to normal JSON 👍
Oh interesting! Do you have a use case for that? I guess if we eventually support substrings you could match against binary-packed varsig headers and stuff. I think we're on the same page about IPLD > JSON 👍 |
I don't have one per say, but I've dealt with sub-byte packing in filecoin world and trying to handle that kind of data mapped to base64 does not seem ideal. On a separate note in most cases when we have bytes we don't have DAG-JSON-ified version of them and having to encode it seems impractical.
With jq selectors you could actually select a slice within bytes (if they were represented as byte arrays) which is also motivation here. |
Super interesting 🤔 Anyhow, it sounds like we're all on team "treat it as IPLD". I'm updating my implementation to that now 👍 |
Extracting this discussion into own thread https://github.com/ucan-wg/delegation/pull/3/files#r1502988400
Inlining relevant messages from above thread for the context
@expede:
The text was updated successfully, but these errors were encountered: