bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#42994: 27.1; json-serialize unable to serialize JSON values


From: Jimmy Yuen Ho Wong
Subject: bug#42994: 27.1; json-serialize unable to serialize JSON values
Date: Mon, 24 Aug 2020 07:13:18 +0100

> For interoperability with other systems etc. that
> do not support scalar texts, it can be useful to
> have a mode that, likewise, doesn't support/allow
> scalars as JSON texts - e.g., a "disable scalars"
> mode, which rejects a document that isn't an
> object or an array.
>
> But by default Emacs should support scalar texts.

There's no need for any RFC modes. Decoding in Emacs with RFC 4627 is
pointless as there are already :null-object and :false-object to
enable translation of JSON values in elisp. Providing any kind of mode
for encoding is also pointless, as the author sending the JSON should
know what the other end expects. If the other side doesn't accept
scalars, it'll reject there, and the client author can adjust
accordingly.





reply via email to

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