Converting many standard values (date, time, bytes, complex numbers, UUIDs, etc.) to text and back from text is quite easy.
Creating a format serializable by JSON is quite easy too (just add a data type info to each converted value - example: "date:2026-06-03", BTW "int:42" solves the JSON key type limitation). What’s quite disappointing and surprising (at least for me) is that there is no real standard for that.
Given the history of TOML, there is a chance that a well thought out solution that suits not 80%, but 99+% becomes a wide-spread standard.
Note that JSON is not the only data format; serialization issues exist across all data formats. This means serialization is not specific to JSON. Each format has its own data types and constraints.
When data falls outside those constraints, it often indicates a mismatch between the data format and the use case, which can result in using the wrong format or misusing an existing one rather than a limitation unique to JSON. In such cases, the issue is typically not with the format itself, but with choosing an inappropriate representation for the data.
For example, using JSON to transmit binary data does not make much sense.
Why isn’t it JSON? The OP is proposing an opinionated way to serialize some Python object to standard JSON, not to create JSON5++.
Anyway, PYON is cool. It remembers me Starcraft. We can build our own JSON, with blackjack and… lemonade.
I don’t get the point. I always used JSON in the body of an endpoint, never as URL param or path.
Notice that the OP didn’t added bytes to the proposal. On the contrary, he also explained why he didn’t add it.
My reasoning differs from that of the original poster and applies to any Python object that cannot be represented as text. JSON is not an appropriate format for transmitting data types that it does not support. Serialization is not an issue with the JSON format itself. The JSON library is already complete. This means that the concern of a JSON library is to support JSON data types in Python, not Python-specific data types or objects within JSON.