emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [External] : Re: [PATCH] Implement fast verisons of json-parse funct


From: Drew Adams
Subject: RE: [External] : Re: [PATCH] Implement fast verisons of json-parse functions
Date: Sat, 30 Mar 2024 20:18:03 +0000

> >> 2. Handling of a single \0 byte
> >
> > Does JSON allow null bytes in its strings?

Strict JSON doesn't allow null characters (U+0000).
But does this parser only support strict JSON?

Much JSON in the wild uses various forms of lax
syntax.  There, null chars are often allowed.

> >> 3. Handling objects with duplicate keys.

The JSON standard _recommends_ that a JSON object
not have duplicate field names.  But it doesn't
prohibit this, for a field name to be well-formed.

This is another case where feral JSON sometimes
departs from recommended syntax.

It's good if a JSON parser can use _either_ strict
or some version of a lax JSON syntax, au choix.

Lax-syntax support can be important for practical
(real world) reasons.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]