Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 27 additions & 1 deletion draft-vasters-json-structure-core.md
Original file line number Diff line number Diff line change
Expand Up @@ -482,7 +482,8 @@ A universally unique identifier.

- Base type: `string`
- Constraints:
- The string value MUST conform to the {{RFC9562}} `UUID` format.
- The string value MUST conform to the {{RFC9562}} `UUID` format, or to an
alternate encoding specified by the `uuidEncoding` keyword.

#### `uri` {#uri}

Expand Down Expand Up @@ -1443,6 +1444,31 @@ types to constrain the fractional part.
}
~~~

### The `uuidEncoding` Keyword {#uuidencoding-keyword}

Specifies the encoding format for a UUID value. The `uuidEncoding` keyword is
used as an annotation for `uuid` types.

The permitted values for `uuidEncoding` are:

- `rfc9562`: The UUID value is encoded in the standard {{RFC9562}} hexadecimal
format with dashes (e.g., `550e8400-e29b-41d4-a716-446655440000`). This is the
default.
- `base32hex`: The UUID value is encoded as a 26-character unpadded base32hex
string as defined in Section 7 of {{RFC4648}}
(e.g., `AK788072JD0T99OM8HJ5AH0000`).

If `uuidEncoding` is not specified, the default encoding is `rfc9562`.

**Example**:

~~~ json
{
"type": "uuid",
"uuidEncoding": "base32hex"
}
~~~

### The `contentEncoding` Keyword {#contentencoding-keyword}

Specifies the encoding of a binary value. The `contentEncoding` keyword is used
Expand Down