Skip to content

Commit bedd92b

Browse files
committed
docs: clarify JSON terms in COREDUMP_PACKAGE_METADATA
1 parent dc063e0 commit bedd92b

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

docs/COREDUMP_PACKAGE_METADATA.md

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,9 @@ multiple implementers might use it when building packages, or core file analyzer
3434
so on.
3535

3636
The metadata will be embedded in a single, new, 4-bytes-aligned, allocated, 0-padded,
37-
read-only ELF header section, in a key-value JSON format. Implementers working on parsing
38-
core files should not assume a specific list of keys, but parse anything that is included
39-
in the section. Implementers working on build tools should strive to use the same key
37+
read-only ELF header section, in a name-value JSON object format. Implementers working on parsing
38+
core files should not assume a specific list of names, but parse anything that is included
39+
in the section. Implementers working on build tools should strive to use the same
4040
names, for consistency. The most common will be listed here. When corresponding to the
4141
content of os-release, the values should match, again for consistency.
4242

@@ -49,7 +49,7 @@ the original executable, debuginfo and sources, to further facilitate debugging.
4949
SECTION: `.note.package`
5050
node-id: `0xcafe1a7e`
5151
Owner: `FDO` (FreeDesktop.org)
52-
Value: a JSON string with the structure described below
52+
Value: a single JSON object encoded as a zero-terminated UTF-8 string
5353
```
5454

5555
* JSON payload
@@ -67,6 +67,11 @@ Value: a JSON string with the structure described below
6767
}
6868
```
6969

70+
The format is a single JSON object, encoded as a zero-terminated `UTF-8` string.
71+
Each name in the object shall be unique as per recommendations of
72+
[RFC8259](https://datatracker.ietf.org/doc/html/rfc8259#section-4). Strings shall
73+
not contain any control character, nor use `\uXXX` escaping.
74+
7075
When it comes to JSON numbers, this specification assumes that JSON parsers
7176
processing this information are capable of reproducing the full signed 53bit
7277
integer range (i.e. -2⁵³+1…+2⁵³-1) as well as the full 64bit IEEE floating

0 commit comments

Comments
 (0)