]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
docs: clarify the assumption on numeric values of JSON parsers we make
authorLennart Poettering <lennart@poettering.net>
Fri, 12 Nov 2021 09:17:07 +0000 (10:17 +0100)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Fri, 19 Nov 2021 14:10:37 +0000 (15:10 +0100)
Prompted by:

https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/message/BOBD6KVTXPR6K5ANAX6LIJLKNSGXCR3B/

docs/COREDUMP_PACKAGE_METADATA.md

index e34abbd147839de2e3a989fbcc8ef2de8c28b8bb..705d5d695aa6b0d5922784d63a1f17a0e5069a70 100644 (file)
@@ -67,6 +67,16 @@ Value: a JSON string with the structure described below
 }
 ```
 
+When it comes to JSON numbers, this specification assumes that JSON parsers
+processing this information are capable of reproducing the full signed 53bit
+integer range (i.e. -2⁵³+1…+2⁵³-1) as well as the full 64bit IEEE floating
+point number range losslessly (with the exception of NaN/-inf/+inf, since JSON
+cannot encode that), as per recommendations of
+[RFC8259](https://datatracker.ietf.org/doc/html/rfc8259#page-8). Fields in
+these JSON objects are thus permitted to encode numeric values from these
+ranges as JSON numbers, and should not use numeric values not covered by these
+types and ranges.
+
 A reference implementations of a [build-time tool is provided](https://github.com/systemd/package-notes)
 and can be used to generate a linker script, which can then be used at build time via
 ```LDFLAGS="-Wl,-T,/path/to/generated/script"``` to include the note in the binary.