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

Lexicon updates: new types, string formats #580

Closed
pfrazee opened this issue Feb 22, 2023 · 3 comments · Fixed by #688
Closed

Lexicon updates: new types, string formats #580

pfrazee opened this issue Feb 22, 2023 · 3 comments · Fixed by #688
Assignees

Comments

@pfrazee
Copy link
Collaborator

pfrazee commented Feb 22, 2023

  • Add the following types to Lexicon
    • bytes
      • In CBOR, uses the binary tag
      • In JSON, looks like {$type: 'bytes', value: string} with value using a base64 encoding
    • cid-internal-ref
      • In CBOR, uses the link tag
      • In JSON, looks like {$type: 'cid-internal-ref', value: string} with value using a base64 encoding
  • Remove the datetime type
  • Add the format modifier to strings
    • This should apply additional validation to strings
  • Add the following string formats:
    • datetime
    • at-uri
    • did
    • cid
  • Update all lexicons as follows:
    • Change any datetime type to a string with the datetime format
    • Add formats to any strings that might benefit from them
@bnewbold
Copy link
Collaborator

In the example for cid-internal-ref for JSON, do you mean {$type: 'cid-internal-ref', value: string}`? If not, it seems like it would not safely round-trip without schema between CBOR and JSON.

@pfrazee
Copy link
Collaborator Author

pfrazee commented Feb 24, 2023

Yes, apologies

@dholms dholms self-assigned this Mar 13, 2023
This was referenced Mar 16, 2023
@dholms
Copy link
Collaborator

dholms commented Apr 4, 2023

fixed #658

@dholms dholms closed this as completed Apr 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants