3.2 Data Types and Formats
3.2 Data Types and Formats
3.2.1 LexID
See Chapter 2.5 for the complete definition.
3.2.2 UUID
See Chapter 2.5 for the complete definition.
3.2.3 Additional Data Types
| Type | Format | Example | Validation |
|---|---|---|---|
String | UTF-8 | "Bundesministerium" | MUST be UTF-8 encoded (Rule FMT-01FMT-01 The file MUST be encoded in UTF-8.). |
Number | JSON Number | 42, 3.14, 1000.50 | MUST be a JSON-conformant number (IEEE 754 double) (Rule FMT-13FMT-13 Every field value MUST have the data type 3.2.3 gives it: a Number a JSON number, a Boolean a JSON Boolean, a DateTime an RFC 3339 date-time, an Enum one of the values defined for the field, an Object a JSON object, an Array a JSON array.). MAY represent integer or decimal values. |
Boolean | Boolean | true, false | MUST be a JSON Boolean (true or false) (Rule FMT-13FMT-13 Every field value MUST have the data type 3.2.3 gives it: a Number a JSON number, a Boolean a JSON Boolean, a DateTime an RFC 3339 date-time, an Enum one of the values defined for the field, an Object a JSON object, an Array a JSON array.). |
DateTime | RFC 3339 | "2024-01-01T12:00:00+01:00" | MUST be a date-time as defined in RFC 3339, section 5.6, the JSON Schema format date-time (Rule FMT-13FMT-13 Every field value MUST have the data type 3.2.3 gives it: a Number a JSON number, a Boolean a JSON Boolean, a DateTime an RFC 3339 date-time, an Enum one of the values defined for the field, an Object a JSON object, an Array a JSON array.). |
Enum | String | "draft", "inForce", "AND" | MUST be a value defined in the specification (Rule FMT-13FMT-13 Every field value MUST have the data type 3.2.3 gives it: a Number a JSON number, a Boolean a JSON Boolean, a DateTime an RFC 3339 date-time, an Enum one of the values defined for the field, an Object a JSON object, an Array a JSON array.). Permitted values are documented in the respective field. |
Object | JSON Object | {"key": "value"} | MUST be a JSON object (Rule FMT-13FMT-13 Every field value MUST have the data type 3.2.3 gives it: a Number a JSON number, a Boolean a JSON Boolean, a DateTime an RFC 3339 date-time, an Enum one of the values defined for the field, an Object a JSON object, an Array a JSON array.). |
Array | JSON Array | [1, 2, 3] | MUST be a valid JSON Array (Rule FMT-13FMT-13 Every field value MUST have the data type 3.2.3 gives it: a Number a JSON number, a Boolean a JSON Boolean, a DateTime an RFC 3339 date-time, an Enum one of the values defined for the field, an Object a JSON object, an Array a JSON array.). |
3.2.4 Hash Format
Hashing and integrity assurance of the RUML file are a responsibility of the RUML container (see
Chapter 7). The RUML JSON file contains no hash of itself. The hashes it
may contain belong to other content: derivedFrom.originalHash (3.3), the
hash of a context entry (4.11) and the digest of a
text entry (4.12).
Hash format (reference for container level):
Hashes in RUML use the extended format:
"{algorithm}:{value}"Example:
"sha3-256:4e03657aea45a94fc7d47c89e3f5a2b7c4d8e9f0a1b2c3d4e5f6a7b8c9d0e1f2"Supported algorithms:
| Algorithm | Usage | Format |
|---|---|---|
sha3-256 | MUST be used for all new containers | 64 hexadecimal characters |
sha256 | MAY be used for backward compatibility | 64 hexadecimal characters |
blake3 | MAY be used for performance-critical applications | 64 hexadecimal characters |
Canonical JSON representation:
For consistent hash computation at container level, the RUML file MUST be canonicalized. Canonicalization MUST implement RFC 8785 (JSON Canonicalization Scheme). Details on the computation procedure see Chapter 7.
Authenticity and legal binding:
Hashes alone guarantee no authenticity and no legal binding. These guarantees are achieved through signatures at container level (see Chapter 7).
3.2.5 Integrity Assurance
Integrity assurance — including hashing, signatures, and timestamps — is handled entirely at
container level (see Chapter 7). Inline fields such as metadata.hash
or metadata.integrity are no longer part of the RUML data model.
3.2.6 RUML File Structure (Top-Level)
The top-level structure of a RUML file is defined in Chapter 2.2.
Design principle: Key = identifier for map structures
RUML consistently uses the principle that for map structures (JSON objects), the key itself serves
as the identifier. An entry therefore MUST NOT repeat its own key as a field: a node carries
no lexId field, and text, datapoint, and context objects carry no id field of their own
(Rule FMT-14FMT-14 A DataPoint, text entry or context entry MUST NOT have an id field; its key is its id., Rule NODE-03NODE-03 A node MUST NOT have fields other than those of 3.5; in particular it MUST NOT store its LexID (lexId), its parent or its type.).
Other identifiers on the entry are unaffected. A node is keyed by its LexID but still carries a
REQUIRED id holding its UUID (see
Chapter 2.5) — a distinct identifier, not a
copy of the key (Rule NODE-01NODE-01 A node MUST have id and label.).
This principle applies to all map structures in RUML:
nodes – Key is the LexID (e.g., "1", "42")
capabilities[{id: "ruml:text-reference"}].data – Key is the text ID (e.g., "text_bgb_823",
"text_sgb_12_21")
capabilities[].data – Key is the artifact ID (e.g., "ctx_bgh_2024", "dp_monthly_income") for
the data of ruml:datapoints, ruml:context, etc.
Benefits: No redundancy, guaranteed uniqueness through JSON key semantics, simpler validation.