Data Type [[data_type: SyntaxConcept]]SyntaxConcept
- dependsField
Description [[description: text]]textYAML Block SyntaxConcept 73%Syntax Syntax 73%Object SyntaxConcept 72%
QMD.md supports these primitive data types: string, number, boolean, null. Type auto-detection rules determine how field values are parsed.
Syntax [[syntax: text]]textCommon Errors NarrativeDoc 70%Syntax Syntax 67%
Type auto-detection rules (applied to field values):
true|false→ Boolean (lowercase only)nullor empty value after colon → Null- Integer or decimal → Number (
-?\d+(\.\d+)?, magnitude from1e-4to 2^53-1) - Everything else → String
NOT supported: yes, no, True, FALSE (for unambiguity)
Nor are these numeric forms — each is a String and raises unsupported_number_format, because
each one only ever worked in whichever host language happened to accept it: 1e5, 1.5e-3, 2E3
(exponents), .5 and 5. (a bare leading or trailing dot), +1 (unary plus), 1_000 (digit
separators), 0x10 and 0o17 (other bases). The authored text is kept as the value, so nothing is
lost — the error exists so the spelling is refused out loud rather than silently reinterpreted.
A bare ~ is likewise a String, not null — that spelling belongs to YAML — but it raises no error,
because it is not a number anyone mis-spelled. Infinity and NaN are plain Strings for the same
reason.
Forcing string type: use quotes "123" to prevent number parsing.
Empty string requires quotes: - field: "" (without quotes, empty value = null).
Primitives [[primitives: text]]textArray SyntaxConcept 71%Parser Microtests TestSuite 67%Unsupported Number Format ValidationError 67%
- String: text values. Quotes optional for simple strings. Required in YAML arrays for values with spaces/commas.
- Number: an integer or a decimal, optionally negative — exactly
-?\d+(\.\d+)?, with a magnitude between1e-4and9007199254740991(2^53-1). No exponents, no bare leading or trailing dot, no unary plus, no digit separators, no alternative bases. A literal outside the range keeps its authored text as a String and raisesunsupported_number_format, so digits are never silently rounded (9223372036854775807stays text) and nothing is written back in a spelling the format cannot read (0.00001would need an exponent). Within the range a decimal carries IEEE-754 double semantics, so authored precision beyond a double's is not preserved (0.1234567890123456789reads back shorter). - Boolean:
trueorfalseonly (lowercase).True,FALSE,yes,noare strings. - Null: keyword
nullor empty value after colon (- field:). - Array: ordered list of primitives or objects. Two syntaxes: YAML notation and Markdown lists.
- Object: nested structure with fields. Created via subheadings — result is a separate object + reference in parent. Everything is flat: array of objects +
[[#id]]references. - Map: flat string dictionary (str→str). Defined via
[[field: map]]. No type auto-detection — all values stored as strings.
Map Type [[map_type: text]]textInvalid Map Content ValidationError 75%Syntax Syntax 72%Invalid Map Entry ValidationError 72%
The map type is a flat dictionary str→str. Defined via [[field: map]] heading syntax. Type auto-detection is NOT applied: all values are stored as strings. true, false, null, numbers — everything remains a string.
### env [[env: map]]
- port: 8080
- debug: true
- count: null
- description:
Result: {"port": "8080", "debug": "true", "count": "null", "description": ""}.
Map supports multiline values via YAML pipe syntax |.
Rules [[rules: text]]textCommon Errors NarrativeDoc 77%Invalid Map Content ValidationError 70%Syntax Syntax 68%
- Type detection is case-sensitive: only lowercase
true,false,nullare recognized - Quoted values are always strings regardless of content
- Empty value after colon = null; empty string requires quotes
- Map fields accept only bullet lists with
- key: valuepairs - Invalid map entries generate
invalid_map_entryerror - Non-bullet content in map fields generates
invalid_map_contenterror