From: Drew Adams <drew.adams@oracle.com>
To: "Herman, Géza" <geza.herman@gmail.com>
Cc: "Eli Zaretskii" <eliz@gnu.org>,
"Mattias Engdegård" <mattiase@acm.org>,
"emacs-devel@gnu.org" <emacs-devel@gnu.org>
Subject: RE: [External] : Re: [PATCH] Implement fast verisons of json-parse functions
Date: Sat, 30 Mar 2024 23:28:59 +0000 [thread overview]
Message-ID: <SJ0PR10MB5488C4D3FB0226178F530D0EF3392@SJ0PR10MB5488.namprd10.prod.outlook.com> (raw)
In-Reply-To: <87sf07mnmx.fsf@gmail.com>
> Drew Adams writes:
>
> >> >> 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?
>
> This parser only accepts JSONs which are according to the spec (in
> theory). But this is not different from the libjansson based
> parser in this regard. That also doesn't allow null characters in
> JSON.
It might be good if in the future there were
_also_ a way to parse lax (real-world) JSON data.
Not that strict JSON isn't real-world. It's just
that there's also lots of real-world JSON data
that's not strict. And yes, there are parsers
that handle it.
> Just to be sure that we're on the same page: this means that the
> parser doesn't support actual null bytes in the stream. But if a
> user wants to put a U+0000 character in a string, they can do that
> by using "\u0000".
Yes, we're on the same page. I meant _unescaped_
NUL (^@, U+0000, \0) chars - I shoulda said that.
Often a lax parser treats all ASCII control chars,
including U+0000, as insignificant whitespace.
next prev parent reply other threads:[~2024-03-30 23:28 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-19 18:23 [PATCH] Implement fast verisons of json-parse functions Herman, Géza
2024-03-19 18:47 ` Eli Zaretskii
2024-03-19 18:50 ` Herman, Géza
2024-03-19 19:28 ` Eli Zaretskii
2024-03-19 19:50 ` Herman, Géza
2024-03-20 3:37 ` Eli Zaretskii
2024-03-23 10:40 ` Herman, Géza
2024-03-23 11:11 ` Eli Zaretskii
2024-03-30 7:43 ` Eli Zaretskii
2024-03-30 10:50 ` Herman, Géza
2024-03-30 13:00 ` Eli Zaretskii
2024-03-30 18:36 ` Herman, Géza
2024-03-30 20:18 ` [External] : " Drew Adams
2024-03-30 20:51 ` Herman, Géza
2024-03-30 23:28 ` Drew Adams [this message]
2024-03-31 5:08 ` Eli Zaretskii
2024-03-31 14:51 ` Mattias Engdegård
2024-03-31 15:44 ` Eli Zaretskii
2024-04-01 8:48 ` Mattias Engdegård
2024-04-01 16:54 ` Herman, Géza
2024-03-31 17:48 ` Adam Porter
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=SJ0PR10MB5488C4D3FB0226178F530D0EF3392@SJ0PR10MB5488.namprd10.prod.outlook.com \
--to=drew.adams@oracle.com \
--cc=eliz@gnu.org \
--cc=emacs-devel@gnu.org \
--cc=geza.herman@gmail.com \
--cc=mattiase@acm.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.