[PATCH v2] libebl: recognize FDO Packaging Metadata ELF note
Frank Ch. Eigler
Tue Nov 30 16:23:52 GMT 2021
On Tue, Nov 30, 2021 at 12:25:41PM +0100, Mark Wielaard wrote:
> The spec does explain the requirements for JSON numbers, but doesn't
> mention any for JSON strings or JSON objects. It would be good to also
> explain how to make the strings and objects unambiguous. [...]
> For Objects it should require that all names are unique. [...]
> For Strings it should require that \uXXXX escaping isn't used [...]
> That should get rid of various corner cases that different parsers are
> known to get wrong.
Are such buggy parsers seen in the wild, now, after all this time with
JSON? It seems to me it's not really elfutils' or systemd's place to
impose -additional- constraints on customary JSON.
> Especially \uXXXX escaping is really confusing when using the UTF-8
> encoding (and it is totally necessary since UTF-8 can express any
> valid UTF character already).
Yes, and yet we have had the bidi situation recently where UTF-8 raw
codes could visually confuse a human reader whereas escaped \uXXXX
wouldn't. If we forbid \uXXXX unilaterally, we literally become
incompatible with JSON (RFC8259 7. String. "Any character may be
escaped."), and for what?
Both these seem to be personal aesthetic decisions that need not be
imposed on a routine application of well-established standards. We
have many industrial-strength json parser libraries to choose from,
so that part is IMO no longer a timely concern.
More information about the Elfutils-devel