Skip to content

Conversation

@clemensv
Copy link
Contributor

This PR adds a new uuidEncoding type annotation keyword for the uuid type that allows specifying alternate UUID encoding formats.

Changes

  1. Updated the uuid type definition (Section 3.2.2.20) to reference the new uuidEncoding keyword for alternate encodings.

  2. Added the uuidEncoding Keyword section with the following permitted values:

    • rfc9562: Standard RFC 9562 UUID format (default)
    • base32hex: 26-character unpadded base32hex encoding (RFC 4648)
    • base64: Base64 encoding (RFC 4648)
    • base64url: Base64url encoding (RFC 4648)

Background

As discussed in #14, this implements a type qualifier approach to select the UUID encoding format, allowing for compact representations like base32hex while maintaining backward compatibility with the standard RFC 9562 format as the default.

Fixes #14

Clemens Vasters added 6 commits November 29, 2025 16:34
This adds a new 'uuidEncoding' type annotation keyword for the 'uuid' type
that allows specifying alternate UUID encoding formats:

- rfc9562: Standard RFC 9562 UUID format (default)
- base32hex: 26-character unpadded base32hex encoding (RFC 4648)
- base64: Base64 encoding (RFC 4648)
- base64url: Base64url encoding (RFC 4648)

Fixes #14
These encodings are being considered for inclusion in RFC 9562.
All encoding examples now use the same UUID: 550e8400-e29b-41d4-a716-446655440000
- Added RFC references for rfc9562 and base32hex (RFC4648 Section 7)
- Added alphabet specification for base64sort
- Noted that base64sort and base52sort are under consideration for RFC 9562 revision
- Clarified that rfc9562 uses hexadecimal format with dashes
Only include encodings explicitly defined in RFC 9562 and RFC 4648:
- rfc9562: Standard hexadecimal format with dashes
- base32hex: 26-character unpadded base32hex (RFC 4648 Section 7)
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 this pull request may close these issues.

New base32hex 26-character unpadded format for UUID

2 participants