From 97300fa23aa83e84756b89cc5c75dd5d96aa853c Mon Sep 17 00:00:00 2001 From: Serhiy Storchaka Date: Thu, 18 Jun 2026 21:06:14 +0300 Subject: [PATCH] Update RFC references for the JSON format from RFC 7159 to RFC 8259 --- Doc/library/json.rst | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Doc/library/json.rst b/Doc/library/json.rst index 383ccad9df041b..b98a978b9a061b 100644 --- a/Doc/library/json.rst +++ b/Doc/library/json.rst @@ -9,7 +9,7 @@ -------------- `JSON (JavaScript Object Notation) `_, specified by -:rfc:`7159` (which obsoletes :rfc:`4627`) and by +:rfc:`8259` (which obsoletes :rfc:`7159`) and by `ECMA-404 `_, is a lightweight data interchange format inspired by `JavaScript `_ object literal syntax @@ -632,7 +632,7 @@ Exceptions Standard Compliance and Interoperability ---------------------------------------- -The JSON format is specified by :rfc:`7159` and by +The JSON format is specified by :rfc:`8259` and by `ECMA-404 `_. This section details this module's level of compliance with the RFC. For simplicity, :class:`JSONEncoder` and :class:`JSONDecoder` subclasses, and @@ -652,8 +652,9 @@ default settings. Character Encodings ^^^^^^^^^^^^^^^^^^^ -The RFC requires that JSON be represented using either UTF-8, UTF-16, or -UTF-32, with UTF-8 being the recommended default for maximum interoperability. +The RFC requires that JSON exchanged between systems that are not part of a +closed ecosystem be encoded using UTF-8 for maximum interoperability. Earlier +specifications of JSON also permitted the use of UTF-16 and UTF-32. As permitted, though not required, by the RFC, this module's serializer sets *ensure_ascii=True* by default, thus escaping the output so that the resulting