[16] JSON5 は、 JSON と似て非なるデータ形式です。 その名前に反して、 JSON とは無関係に作られたものです。
[6] JSON5 は、 JSON と ES5 を参考に開発されたデータ形式です。 JSON と称していますが JSON ではありません。
[17] 開発主体も JSON とも ECMAScript とも無関係です。 勝手に JSON を称しているだけで新バージョンでもないので要注意。
[5] The JSON5 Data Interchange Format, , https://spec.json5.org/
[1] aseemk/json5 ( ( 版)) https://github.com/aseemk/json5
[2] JSON5 by aseemk ( ( 版)) http://json5.org/
[4] GitHub - json5/json5: JSON5 — JSON for humans, https://github.com/json5/json5
[7] GitHub - json5/json5-spec: The JSON5 Data Interchange Format, https://github.com/json5/json5-spec
[9] GitHub - d3x0r/JSON6: JSON for Humans (ES6), https://github.com/d3x0r/JSON6
[10] GitHub - mmkal/eson: ESON — JSON for humans, https://github.com/mmkal/eson
This is a backwards-compatible fork of https://github.com/json5/json5, with added support for template literals - based on the idea in this comment. Since JSON5 is a well-established and active project, most references to "JSON5" in this fork have not been replaced with "ESON", to avoid merge conflicts. When reading these docs and source code, you can mentally replace "JSON5" with "ESON" (or "json5" with "eson").
[12] JSON Functions And Operators, , https://www.sqlite.org/json1.html#json5
Beginning in version 3.42.0 (2023-05-16), these routines will read and interpret input JSON text that includes JSON5 extensions. However, JSON text generated by these routines will always be strictly conforming to the canonical definition of JSON.
For backwards compatibility, the json_valid(X) function continues to report false for inputs that are not canonical JSON, even if the input is JSON5 that the function is able to understand.
SQLite extends the JSON5 syntax in these two ways:
- Strict JSON5 requires that unquoted object keys must be ECMAScript 5.1 IdentifierNames. But large unicode tables and lots of code is required in order to determine whether or not a key is an ECMAScript 5.1 IdentifierName. For this reason, SQLite allows object keys to include any unicode characters greater than U+007f that are not whitespace characters. This relaxed definition of "identifier" greatly simplifies the implementation and allows the JSON parser to be smaller and run faster.
- JSON5 allows floating-point infinities to be expressed as "
Infinity
", "-Infinity
", or "+Infinity
" in exactly that case - the initial "I" is capitalized and all other characters are lower case. SQLite also allows the abbreviation "Inf" to be used in place of "Infinity
" and it allows both keywords to appear in any combination of upper and lower case letters. Similarly, JSON5 allows "NaN" for not-a-number. SQLite extends this to also allow "QNaN" and "SNaN" in any combination of upper and lower case letters. Note that SQLite interprets NaN, QNaN, and SNaN as just an alternative spellings for "null". This extension has been added because (we are told) there exists a lot of JSON in the wild that includes these non-standard representations for infinity and not-a-number.
[13] 「JSON」と称して JSON5 に対応する邪悪。これは本来の JSON
仕様に違反している。
json_valid
がまともな挙動なのは最後の良心か。
[14] しかも「JSON」を称した「JSON5」がオリジナルの JSON5 ではなく独自拡張付きとかいう地獄。
[15] なぜ「違うものには違う名前をつける」という簡単なことができないのか。
[11] 普及する前から fork が乱立とかやべーなwww しかも fork が面倒だから(意訳)と本家の名前を名乗ってるとか闇すぎるwww