Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
JSON
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
== Supersets == Support for [[Comment (computer programming)|comments]] and other features have been deemed useful, which has led to several nonstandard JSON [[superset]]s being created. Among them are HJSON,<ref>{{cite book|last1=Edelman|first1=Jason|last2=Lowe|first2=Scott|last3=Oswalt|first3=Matt|title=Network Programmability and Automation|publisher=[[O'Reilly Media]]|quote=for data representation you can pick one of the following: YAML, YAMLEX, JSON, JSON5, HJSON, or even pure Python}}</ref> HOCON, and JSON5 (which despite its name, is not the fifth version of JSON).<ref name=lucidchart/><ref>{{cite web | url=https://github.com/lightbend/config/blob/master/HOCON.md |title=HOCON (Human-Optimized Config Object Notation) |date=2019-01-28 |website=GitHub |access-date=2019-08-28 |quote=The primary goal is: keep the semantics (tree structure; set of types; encoding/escaping) from JSON, but make it more convenient as a human-editable config file format.}}</ref> === YAML === {{See also|YAML#JSON}} [[YAML]] version 1.2 is a superset of JSON; prior versions were not strictly compatible. For example, escaping a slash {{code|/}} with a backslash {{code|\}} is valid in JSON, but was not valid in YAML.<ref name="YAML Version 1.2">{{cite web|url=http://www.yaml.org/spec/1.2/spec.html|title=YAML Ain't Markup Language (YAML™) Version 1.2|work=yaml.org|access-date=13 September 2015}}</ref> YAML supports comments, while JSON does not.<ref name="YAML Version 1.2"/><ref name=lucidchart>{{cite web |last1=McCombs |first1=Thayne |title=Why JSON isn't a good configuration language |date=July 16, 2018 |url=https://www.lucidchart.com/techblog/2018/07/16/why-json-isnt-a-good-configuration-language/ |publisher=Lucid Chart |access-date=15 June 2019}}</ref><ref name=DouglasCrockfordComments/> === CSON === '''CSON''' ("[[CoffeeScript]] Object Notation") uses [[significant indentation]] and unquoted keys, and assumes an outer object declaration. It was used for configuring [[GitHub]]'s [[Atom (text editor)|Atom text editor]].<ref>{{cite web |last1=Dohm |first1=Lee |title=CoffeeScript Object Notation |url=https://www.lee-dohm.com/big-book-of-atom/1-introduction/30-coffeescript-object-notation.html |website=The Big Book of [[Atom (text editor)|Atom]] |access-date=29 April 2024 |archive-url=https://web.archive.org/web/20230422101822/http://www.lee-dohm.com/big-book-of-atom/1-introduction/30-coffeescript-object-notation.html |archive-date=2023-04-22 |language=en |date=2014 |url-status=live}}</ref><ref>{{cite web |title=Basic Customization |url=https://flight-manual.atom-editor.cc/using-atom/sections/basic-customization/#configuring-with-cson |website=[[Atom (text editor)|Atom]] Flight Manual |publisher=[[GitHub]] |access-date=29 April 2024 |language=en |url-status=live |archive-url=https://web.archive.org/web/20240429181349/https://flight-manual.atom-editor.cc/using-atom/sections/basic-customization/ |archive-date=2024-04-29}}</ref><ref>{{cite web |title=CSON |url=https://github.com/bevry/cson |publisher=Bevry |via=[[GitHub]] |access-date=29 April 2024 |archive-url=https://web.archive.org/web/20240423234311/http://github.com/bevry/cson |archive-date=2024-04-23 |language=en |date=20 Dec 2023 |url-status=live}}</ref> There is also an unrelated project called '''CSON''' ("Cursive Script Object Notation") that is more syntactically similar to JSON.<ref>{{cite web |url=https://github.com/lifthrasiir/cson |title=CSON |date=2021-07-01 |last1=Seonghoon |first1=Kang |via=[[GitHub]] |access-date=February 27, 2023 |url-status=live |archive-url=https://web.archive.org/web/20231216044815/http://github.com/lifthrasiir/cson |archive-date=2023-12-16}}</ref> === HOCON === '''HOCON''' ("Human-Optimized Config Object Notation") is a format for [[Human-readable medium and data|human-readable]] data, and a superset of JSON.<ref>{{Cite web |title=config/HOCON.md at master · lightbend/config |url=https://github.com/lightbend/config |access-date=2021-08-05 |website=GitHub |language=en}}</ref> The uses of HOCON are: * It is used mostly along with the [[Play Framework]],<ref>{{Cite web |title=Config File - 2.5.x |url=https://www.playframework.com/documentation/2.5.x/ConfigFile |access-date=2021-08-05 |website=www.playframework.com}}</ref> and is developed by [[Lightbend]]. * It is also supported as a configuration format for [[.NET]] projects via Akka.NET<ref>[https://getakka.net/articles/hocon/index.html Akka.NET HOCON Docs]</ref><ref>{{Cite web|title=Akka.NET Documentation | Akka.NET Documentation|url=https://getakka.net/|access-date=2021-08-05|website=getakka.net}}</ref> and [[Puppet (software)|Puppet]].<ref>{{Cite web |url=https://puppet.com/blog/managing-hocon-configuration-files-puppet |title=Managing HOCON configuration files with Puppet |access-date=March 4, 2023 |archive-date=February 11, 2017 |archive-url=https://web.archive.org/web/20170211075556/https://puppet.com/blog/managing-hocon-configuration-files-puppet |url-status=dead }}</ref> * TIBCO Streaming:<ref>{{Cite web|title=StreamBase Documentation|url=https://docs.streambase.com/latest/index.jsp|access-date=2021-08-05|website=docs.streambase.com}}</ref> HOCON is the primary configuration file format for the TIBCO Streaming<ref>{{Cite web|title=Configuration Guide|url=https://docs.streambase.com/latest/topic/com.streambase.sb.ide.help/data/html/hocon/index.html|access-date=2021-08-05|website=docs.streambase.com}}</ref> family of products (StreamBase, LiveView, and Artifact Management Server) as of TIBCO Streaming Release 10.<ref>{{Cite web|title=StreamBase New and Noteworthy Archive|url=https://docs.streambase.com/latest/topic/com.streambase.sb.ide.help/data/html/dochome/xarchive-sb-noteworthy.html|access-date=2021-08-05|website=docs.streambase.com}}</ref> * It is also the primary configuration file format for several subsystems of Exabeam Advanced Analytics.<ref>{{Cite web |url=https://docs.exabeam.com/en/advanced-analytics/i48/release-notes/109536-what-s-new.html |title=Exabeam Advanced Analytics Release Notes |access-date=March 4, 2023 |archive-date=October 20, 2020 |archive-url=https://web.archive.org/web/20201020195403/https://docs.exabeam.com/en/advanced-analytics/i48/release-notes/109536-what-s-new.html |url-status=dead }}</ref> * [[Jitsi]] uses it as the "new" config system and [[.properties]]-Files as fallback<ref>{{cite web |url=https://github.com/jitsi/jitsi-videobridge/commit/676fb3df696c4737ac086fb856af1f85c6ded90e|title=Config phase 1|author=JITSI Project|website=[[GitHub]] |access-date=2021-02-16}}</ref><ref>{{ cite web| url=https://github.com/jitsi/jicofo/blob/add-selection-test/src/main/resources/reference.conf| title=reference.conf| author=JITSI Project| website=[[GitHub]]| access-date=2021-02-16}}</ref> === JSON5 === '''JSON5''' ("JSON5 Data Interchange Format") is an extension of JSON syntax that, like JSON, is also valid JavaScript syntax. The specification was started in 2012 and finished in 2018 with version 1.0.0.<ref>{{cite web|url=https://spec.json5.org/|title=The JSON5 Data Interchange Format|access-date=2022-06-25}}</ref> The main differences to JSON syntax are: * Optional trailing commas * Unquoted object keys * Single quoted and multiline strings * Additional number formats * Comments JSON5 syntax is supported in some software as an extension of JSON syntax, for instance in [[SQLite]].<ref>{{cite web|url=https://www.sqlite.org/json1.html#json5_extensions|author=SQLite|access-date=2023-06-25|title=JSON Functions And Operators}}</ref> === JSONC === '''JSONC''' (JSON with Comments) is a subset of JSON5 used in Microsoft's [[Visual Studio Code]]:<ref>{{Cite web |title=JSON with Comments - JSON editing in Visual Studio Code |url=https://code.visualstudio.com/docs/languages/json#_json-with-comments |access-date=2024-04-29 |website=Visual Studio Code |publisher=[[Microsoft]] |language=en}}</ref> * supports single-line comments (<code>//</code>) and block comments (<code>/* */</code>) * accepts trailing commas, but they are discouraged and the editor will display a warning
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)