Ama Aje My Fren <amaajemyf...@gmail.com> added the comment:
I am not the expert on this but I did a swift check of the two documents before doing the documentation PR <https://github.com/python/cpython/pull/19197>. >From my reading of the two, RFC8259 <https://tools.ietf.org/html/rfc8259#section-1.3> seems that: This document's goal is to apply the errata, remove inconsistencies with other specifications of JSON, and highlight practices that can lead to interoperability problems. When one reads a diff of the two RFCs together <https://www.diffchecker.com/xJoy0BDJ>, the only place that seems to have changed from a protocol point of view is in Section 8.1 (RFC 7159 <https://tools.ietf.org/html/rfc7159#section-8.1>, RFC 8259 <https://tools.ietf.org/html/rfc8259#section-8.1>) which now (RFC 8259) requires that all data should be encoded using UTF-8. The security section <https://tools.ietf.org/html/rfc8259#section-12> in the current (RFC 8259) standard states: certain characters such as U+2028 LINE SEPARATOR and U+2029 PARAGRAPH SEPARATOR are legal in JSON but not JavaScript (This has changed in the latest ECMAScript Edition) Therefore from my understanding: 1. which document better describes the behavior of our json module? The json module allows for utf-16 and utf-32 encoding in the loads method. It does not appear to enforce the utf-8 encoding - so closer to RFC 7159. 2. Does it need to be updated along with a doc change? Maybe. I defer to the maintainers of the module. On Sun, Mar 29, 2020 at 2:09 AM Terry J. Reedy <rep...@bugs.python.org> wrote: > > Terry J. Reedy <tjre...@udel.edu> added the comment: > > The header for 8259 says "Obsoletes: 7159" (December 2017) and the header > for 7159 agrees: "Obsoleted by: 8259". But... to the extent that there is > any difference, which document better describes the behavior of our json > module? Does it need to be updated along with a doc change? > > ---------- > nosy: +ezio.melotti, rhettinger, terry.reedy > > _______________________________________ > Python tracker <rep...@bugs.python.org> > <https://bugs.python.org/issue40090> > _______________________________________ > ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue40090> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com