all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Peter" <craven@gmx.net>
To: 48274@debbugs.gnu.org
Subject: bug#48274: 27.2; libjanson: \u0000 is not allowed without JSON_ALLOW_NUL
Date: Fri, 07 May 2021 09:16:57 +0200	[thread overview]
Message-ID: <87r1ijhv2u.fsf@nexoid.at> (raw)

Hello ;)

It seems that Emacs' `json-parse-buffer' cannot correctly parse strings
that contain an escaped ascii 0 value.

To reproduce:

- Create a new buffer, insert into it:
  { "foo": "this is a string including a literal \u0000" }
- Move point to the beginning of the buffer [ M-< ]
- Execute `json-parse-buffer' [ M-: (json-parse-buffer) ]
- See the error message.

According to all other systems I've tried, \u0000 is valid in json
strings.

The error message seems to imply that something (probably libjanson?)
should be compiled with -DJSON_ALLOW_NUL.

As this seems to be non-conformant behaviour, is there a way to change
this in the default Emacs build?

Thanks, Greetings,
Peter

In GNU Emacs 27.2 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.27, cairo version 1.17.4)
 of 2021-03-26 built on juergen
Windowing system distributor 'The X.Org Foundation', version 11.0.12011000
System Description: Arch Linux

Recent messages:
Configured using:
 'configure --prefix=/usr --sysconfdir=/etc --libexecdir=/usr/lib
 --localstatedir=/var --with-x-toolkit=gtk3 --with-xft --with-wide-int
 --with-modules --with-cairo --with-harfbuzz 'CFLAGS=-march=x86-64
 -mtune=generic -O2 -pipe -fno-plt' CPPFLAGS=-D_FORTIFY_SOURCE=2
 LDFLAGS=-Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now'

Configured features:
XPM JPEG TIFF GIF PNG RSVG CAIRO SOUND GPM DBUS GSETTINGS GLIB NOTIFY
INOTIFY ACL GNUTLS LIBXML2 FREETYPE HARFBUZZ M17N_FLT LIBOTF ZLIB
TOOLKIT_SCROLL_BARS GTK3 X11 XDBE XIM MODULES THREADS LIBSYSTEMD JSON
PDUMPER LCMS2 GMP

Important settings:
  value of $LC_COLLATE: C
  value of $LC_MESSAGES:
  value of $LANG: en_GB.UTF-8
  locale-coding-system: utf-8-unix

Major mode: JSON

Memory information:
((conses 16 1891646 539122)
 (symbols 48 122145 126)
 (strings 32 464687 51556)
 (string-bytes 1 14083739)
 (vectors 16 192214)
 (vector-slots 8 3676318 291674)
 (floats 8 1942 24899)
 (intervals 56 37686 13084)
 (buffers 1000 91))





             reply	other threads:[~2021-05-07  7:16 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-07  7:16 Peter [this message]
2021-05-08  9:24 ` bug#48274: 27.2; libjanson: \u0000 is not allowed without JSON_ALLOW_NUL Philipp
2021-05-11 13:31   ` Lars Ingebrigtsen
2022-07-02 13:06   ` Lars Ingebrigtsen

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=87r1ijhv2u.fsf@nexoid.at \
    --to=craven@gmx.net \
    --cc=48274@debbugs.gnu.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.