On Fri, Nov 2, 2018 at 9:31 AM, M.-A. Lemburg email@example.com wrote:
Serialization of those data types is not defined in the JSON standard:
That being said, ISO 8601 is a standard for datetime stamps, and a defacto one for JSON
So building encoding of datetime into Python's json encoder would be pretty useful.
(I would not have any automatic decoding though -- as an ISO8601 string would still be just a string in JSON)
Could we have a "pedantic" mode for "fully standard conforming" JSON, and then add some extensions to the standard?
As another example, I would find it very handy if the json decoder would respect comments in JSON (I know that they are explicitly not part of the standard), but they are used in other applications, particularly when JSON is used as a configuration language.