Skip to content
Merged
Show file tree
Hide file tree
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
1 change: 1 addition & 0 deletions README.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ expressed as JSON Schema definitions.
| IEEE | [IEEE Std 754-2019](https://ieeexplore.ieee.org/document/8766229) | IEEE Standard for Floating-Point Arithmetic |
| IEEE | [IEEE Std 1003.1-2017](https://pubs.opengroup.org/onlinepubs/9699919799/) | IEEE Standard for Information Technology—Portable Operating System Interface (POSIX) Base Specifications, Issue 7 |
| IETF | [RFC 3986](https://www.rfc-editor.org/rfc/rfc3986) | Uniform Resource Identifier (URI): Generic Syntax |
| IETF | [RFC 4648](https://www.rfc-editor.org/rfc/rfc4648) | The Base16, Base32, and Base64 Data Encodings |
| IETF | [RFC 4918](https://www.rfc-editor.org/rfc/rfc4918) | HTTP Extensions for Web Distributed Authoring and Versioning (WebDAV) |
| IETF | [RFC 5322](https://www.rfc-editor.org/rfc/rfc5322) | Internet Message Format |
| IETF | [RFC 5646](https://www.rfc-editor.org/rfc/rfc5646) | Tags for Identifying Languages (BCP 47) |
Expand Down
20 changes: 20 additions & 0 deletions schemas/ietf/encoding/base16.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "RFC 4648 Base16 Encoding",
"description": "Uses digits 0-9 and letters A-F (case-insensitive). Each byte encodes to exactly 2 characters, no padding required",
"examples": [
"48656C6C6F20576F726C6421",
"DEADBEEF",
"0FB7",
"666F6F626172",
""
],
"x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE",
"x-links": [ "https://www.rfc-editor.org/rfc/rfc4648.html#section-8" ],
"type": "string",
"not": {
"pattern": "[\\x00-\\x1F]"
},
"pattern": "^([0-9A-Fa-f]{2})*$",
"contentEncoding": "base16"
}
18 changes: 18 additions & 0 deletions schemas/ietf/encoding/base32.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "RFC 4648 Base32 Encoding",
"description": "Uses uppercase letters A-Z and digits 2-7 (32 characters total). Padding with = to multiple of 8 characters",
"examples": [
"JBSWY3DPEBLW64TMMQ======",
"MFRGG===",
"MZXW6===",
"MZXW6YQ=",
"MZXW6YTB",
""
],
"x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE",
"x-links": [ "https://www.rfc-editor.org/rfc/rfc4648.html#section-6" ],
"type": "string",
"pattern": "^([A-Z2-7]{8})*([A-Z2-7]{2}={6}|[A-Z2-7]{4}={4}|[A-Z2-7]{5}={3}|[A-Z2-7]{7}=)?$",
"contentEncoding": "base32"
}
18 changes: 18 additions & 0 deletions schemas/ietf/encoding/base32hex.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "RFC 4648 Base32hex Encoding",
"description": "Uses digits 0-9 and uppercase letters A-V (32 characters total). Padding with = to multiple of 8 characters",
"examples": [
"91IMOR3F41BMUSJCCG======",
"C5H66===",
"CPNMU===",
"CPNMUO8=",
"CPNMUOJ1",
""
],
"x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE",
"x-links": [ "https://www.rfc-editor.org/rfc/rfc4648.html#section-7" ],
"type": "string",
"pattern": "^([0-9A-V]{8})*([0-9A-V]{2}={6}|[0-9A-V]{4}={4}|[0-9A-V]{5}={3}|[0-9A-V]{7}=)?$",
"contentEncoding": "base32hex"
}
18 changes: 18 additions & 0 deletions schemas/ietf/encoding/base64.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "RFC 4648 Base64 Encoding",
"description": "Uses uppercase letters A-Z, lowercase letters a-z, digits 0-9, plus sign (+), and forward slash (/), with equals sign (=) used for padding",
"examples": [
"R0lGODlhAQABAAAAACw=",
"SGVsbG8gV29ybGQh",
"YQ==",
"YWI=",
"YWJj",
""
],
"x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE",
"x-links": [ "https://www.rfc-editor.org/rfc/rfc4648.html#section-4" ],
"type": "string",
"pattern": "^([A-Za-z0-9+/]{4})*([A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$",
"contentEncoding": "base64"
}
18 changes: 18 additions & 0 deletions schemas/ietf/encoding/base64url.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "RFC 4648 Base64url Encoding",
"description": "Base64 encoding with URL and filename safe alphabet as defined in RFC 4648 section 5. Uses hyphen (-) and underscore (_) instead of plus (+) and slash (/)",
"examples": [
"R0lGODlhAQABAAAAACw=",
"SGVsbG8gV29ybGQh",
"YQ==",
"YWI=",
"YWJj",
""
],
"x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE",
"x-links": [ "https://www.rfc-editor.org/rfc/rfc4648.html#section-5" ],
"type": "string",
"pattern": "^([A-Za-z0-9_-]{4})*([A-Za-z0-9_-]{2}==|[A-Za-z0-9_-]{3}=)?$",
"contentEncoding": "base64url"
}
Loading