From 79aae22593543bf0df0b4b2ffd19f6671966fae8 Mon Sep 17 00:00:00 2001 From: MrTeferi Date: Sun, 7 Aug 2022 04:56:59 -0500 Subject: [hjson/en] add HJSON --- hjson.html.markdown | 94 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 94 insertions(+) create mode 100644 hjson.html.markdown (limited to 'hjson.html.markdown') diff --git a/hjson.html.markdown b/hjson.html.markdown new file mode 100644 index 00000000..e000700a --- /dev/null +++ b/hjson.html.markdown @@ -0,0 +1,94 @@ +--- +language: hjson +filename: learnhjson.hjson +contributors: + - ["MrTeferi", "https://github.com/MrTeferi"] +lang: en +--- + +HJSON is an attempt to make [JSON](https://learnxinyminutes.com/docs/json/) more human readable. + +HJSON is a syntax extension to JSON. +It's NOT a proposal to replace JSON or to incorporate it into the JSON spec itself. +It's intended to be used like a user interface for humans, +to read and edit before passing the JSON data to the machine. + +Let's take a look at examples to see the key syntax differences! + +```hjson +{ + # Comments are totally supported! + + // With forward slashes too! + + /* + Even block style comments, neat! + /* + + # Strings do not require quotes! + # Just keep it to a single line + human: readable + quotes: "are fine too" + + # Notice that commas are also not required! + # If using commas, strings DO require quotes! + object: { + name: hjson + properties: [ + readable + exciting + fun + ] + with_commas: [ + "quoted", + "quoty", + "quote" + ] + details: ["this", "is", "fine", "too"] + } + + # Multiline quotes with proper whitespace handling are supported! + diary: + ''' + I wish JSON was more human readable. + If only there was a JSON for my needs! + Oh wait.. there is! It's called HJSON. + ''' + + # Backslashes are interpretted as an escape character ONLY in quoted strings + slash: This will not have a new line\n + slash-quoted: "This will definitely have a new line\n" + + # Make sure to use quotes when mixing whitespace with important punctuation + example1: "If, you're, going, to, comma in a string, use, quotes!" + example2: "Also if you want to use {} or [] or any JSON relevant punctuation!" + example3: [because, this, is, totally, BROKEN!] + example4: this is technically OK though: {}[],: + + # Enjoy working with HJSON! + party-time: { + hjson-lovers: [ + me + my mom + "my dad" + ] + hjson-power-level: 9000 + supported: { + python: yes + java: yes + javascript: yes + c++: yes + Go: yes + C#: yes + Rust: yes + } + partial-support: ["C", "Kotlin", "Ruby", "Rust"] + } + +} +``` + +## Further Reading + +* [HJSON.github.io](https://hjson.github.io/) Main HJSON site including editor support, how-to, etc. +* [HJSON Packages](https://github.com/hjson/) Various HJSON packages for different applications. -- cgit v1.2.3 From 0960b445c5f21679c9e9b92b8c2cad0cc2c49475 Mon Sep 17 00:00:00 2001 From: MrTeferi <92750180+MrTeferi@users.noreply.github.com> Date: Mon, 8 Aug 2022 10:37:06 -0500 Subject: Update hjson.html.markdown Co-authored-by: Marcel Ribeiro Dantas --- hjson.html.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'hjson.html.markdown') diff --git a/hjson.html.markdown b/hjson.html.markdown index e000700a..2fbda8ef 100644 --- a/hjson.html.markdown +++ b/hjson.html.markdown @@ -72,7 +72,7 @@ Let's take a look at examples to see the key syntax differences! my mom "my dad" ] - hjson-power-level: 9000 + Hjson-power-level: 9000 supported: { python: yes java: yes -- cgit v1.2.3 From 79f799a919c1970c4a5aa0da4f31392cdd3660c0 Mon Sep 17 00:00:00 2001 From: MrTeferi <92750180+MrTeferi@users.noreply.github.com> Date: Mon, 8 Aug 2022 10:37:11 -0500 Subject: Update hjson.html.markdown Co-authored-by: Marcel Ribeiro Dantas --- hjson.html.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'hjson.html.markdown') diff --git a/hjson.html.markdown b/hjson.html.markdown index 2fbda8ef..7129172f 100644 --- a/hjson.html.markdown +++ b/hjson.html.markdown @@ -1,5 +1,5 @@ --- -language: hjson +language: Hjson filename: learnhjson.hjson contributors: - ["MrTeferi", "https://github.com/MrTeferi"] -- cgit v1.2.3 From 4a4d5fda81f4f98d97216615a45ec5678aa5baee Mon Sep 17 00:00:00 2001 From: MrTeferi <92750180+MrTeferi@users.noreply.github.com> Date: Mon, 8 Aug 2022 10:37:16 -0500 Subject: Update hjson.html.markdown Co-authored-by: Marcel Ribeiro Dantas --- hjson.html.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'hjson.html.markdown') diff --git a/hjson.html.markdown b/hjson.html.markdown index 7129172f..98e5f369 100644 --- a/hjson.html.markdown +++ b/hjson.html.markdown @@ -6,7 +6,7 @@ contributors: lang: en --- -HJSON is an attempt to make [JSON](https://learnxinyminutes.com/docs/json/) more human readable. +Hjson is an attempt to make [JSON](https://learnxinyminutes.com/docs/json/) more human readable. HJSON is a syntax extension to JSON. It's NOT a proposal to replace JSON or to incorporate it into the JSON spec itself. -- cgit v1.2.3 From 393da8e16fff94d61d05b21a12dd40cb9fa78615 Mon Sep 17 00:00:00 2001 From: MrTeferi <92750180+MrTeferi@users.noreply.github.com> Date: Mon, 8 Aug 2022 10:37:20 -0500 Subject: Update hjson.html.markdown Co-authored-by: Marcel Ribeiro Dantas --- hjson.html.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'hjson.html.markdown') diff --git a/hjson.html.markdown b/hjson.html.markdown index 98e5f369..eb9b7978 100644 --- a/hjson.html.markdown +++ b/hjson.html.markdown @@ -8,7 +8,7 @@ lang: en Hjson is an attempt to make [JSON](https://learnxinyminutes.com/docs/json/) more human readable. -HJSON is a syntax extension to JSON. +Hjson is a syntax extension to JSON. It's NOT a proposal to replace JSON or to incorporate it into the JSON spec itself. It's intended to be used like a user interface for humans, to read and edit before passing the JSON data to the machine. -- cgit v1.2.3 From 89eef40121ad6b8974eef80db7304e8934fdadfe Mon Sep 17 00:00:00 2001 From: MrTeferi <92750180+MrTeferi@users.noreply.github.com> Date: Mon, 8 Aug 2022 10:37:30 -0500 Subject: Update hjson.html.markdown Co-authored-by: Marcel Ribeiro Dantas --- hjson.html.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'hjson.html.markdown') diff --git a/hjson.html.markdown b/hjson.html.markdown index eb9b7978..e5dd9888 100644 --- a/hjson.html.markdown +++ b/hjson.html.markdown @@ -52,7 +52,7 @@ Let's take a look at examples to see the key syntax differences! ''' I wish JSON was more human readable. If only there was a JSON for my needs! - Oh wait.. there is! It's called HJSON. + Oh wait.. there is! It's called Hjson. ''' # Backslashes are interpretted as an escape character ONLY in quoted strings -- cgit v1.2.3 From 80a70f4fa14194dee82d2f8fa5718cbb24ae57d2 Mon Sep 17 00:00:00 2001 From: MrTeferi <92750180+MrTeferi@users.noreply.github.com> Date: Mon, 8 Aug 2022 10:37:35 -0500 Subject: Update hjson.html.markdown Co-authored-by: Marcel Ribeiro Dantas --- hjson.html.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'hjson.html.markdown') diff --git a/hjson.html.markdown b/hjson.html.markdown index e5dd9888..f92190c0 100644 --- a/hjson.html.markdown +++ b/hjson.html.markdown @@ -65,7 +65,7 @@ Let's take a look at examples to see the key syntax differences! example3: [because, this, is, totally, BROKEN!] example4: this is technically OK though: {}[],: - # Enjoy working with HJSON! + # Enjoy working with Hjson! party-time: { hjson-lovers: [ me -- cgit v1.2.3 From 32aeea15662d80a969d1f8047bdf2a48637b6d05 Mon Sep 17 00:00:00 2001 From: MrTeferi <92750180+MrTeferi@users.noreply.github.com> Date: Mon, 8 Aug 2022 10:37:41 -0500 Subject: Update hjson.html.markdown Co-authored-by: Marcel Ribeiro Dantas --- hjson.html.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'hjson.html.markdown') diff --git a/hjson.html.markdown b/hjson.html.markdown index f92190c0..1a8d5356 100644 --- a/hjson.html.markdown +++ b/hjson.html.markdown @@ -90,5 +90,5 @@ Let's take a look at examples to see the key syntax differences! ## Further Reading -* [HJSON.github.io](https://hjson.github.io/) Main HJSON site including editor support, how-to, etc. +* [Hjson.github.io](https://hjson.github.io/) Main Hjson site including editor support, how-to, etc. * [HJSON Packages](https://github.com/hjson/) Various HJSON packages for different applications. -- cgit v1.2.3 From 9a96b10ef8fb043a8ed338c9f22ad9b6eff6ed05 Mon Sep 17 00:00:00 2001 From: MrTeferi <92750180+MrTeferi@users.noreply.github.com> Date: Mon, 8 Aug 2022 10:37:47 -0500 Subject: Update hjson.html.markdown Co-authored-by: Marcel Ribeiro Dantas --- hjson.html.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'hjson.html.markdown') diff --git a/hjson.html.markdown b/hjson.html.markdown index 1a8d5356..40dad1df 100644 --- a/hjson.html.markdown +++ b/hjson.html.markdown @@ -91,4 +91,4 @@ Let's take a look at examples to see the key syntax differences! ## Further Reading * [Hjson.github.io](https://hjson.github.io/) Main Hjson site including editor support, how-to, etc. -* [HJSON Packages](https://github.com/hjson/) Various HJSON packages for different applications. +* [Hjson Packages](https://github.com/hjson/) Various Hjson packages for different applications. -- cgit v1.2.3 From 752c313d9f8560bc7c9c572553a73cbf016625f5 Mon Sep 17 00:00:00 2001 From: MrTeferi <92750180+MrTeferi@users.noreply.github.com> Date: Mon, 8 Aug 2022 10:37:53 -0500 Subject: Update hjson.html.markdown Co-authored-by: Marcel Ribeiro Dantas --- hjson.html.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'hjson.html.markdown') diff --git a/hjson.html.markdown b/hjson.html.markdown index 40dad1df..f8f6221c 100644 --- a/hjson.html.markdown +++ b/hjson.html.markdown @@ -33,7 +33,7 @@ Let's take a look at examples to see the key syntax differences! # Notice that commas are also not required! # If using commas, strings DO require quotes! object: { - name: hjson + name: Hjson properties: [ readable exciting -- cgit v1.2.3 From 592e8ed3a47c7c06399c7b97cfde97f71b94e12e Mon Sep 17 00:00:00 2001 From: MrTeferi <92750180+MrTeferi@users.noreply.github.com> Date: Mon, 8 Aug 2022 10:37:59 -0500 Subject: Update hjson.html.markdown Co-authored-by: Marcel Ribeiro Dantas --- hjson.html.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'hjson.html.markdown') diff --git a/hjson.html.markdown b/hjson.html.markdown index f8f6221c..2abeca1a 100644 --- a/hjson.html.markdown +++ b/hjson.html.markdown @@ -67,7 +67,7 @@ Let's take a look at examples to see the key syntax differences! # Enjoy working with Hjson! party-time: { - hjson-lovers: [ + Hjson-lovers: [ me my mom "my dad" -- cgit v1.2.3