From 8348e27660026f70f57ca95dbd4b175adada0410 Mon Sep 17 00:00:00 2001 From: Marco Scannadinari Date: Sun, 8 Jun 2014 22:00:14 +0100 Subject: [PATCH 1/3] Add extra detail --- json.html.markdown | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/json.html.markdown b/json.html.markdown index f86f0ae9..28906116 100644 --- a/json.html.markdown +++ b/json.html.markdown @@ -3,6 +3,7 @@ language: json filename: learnjson.json contributors: - ["Anna Harren", "https://github.com/iirelu"] + - ["Marco Scannadinari", "https://github.com/marcoms"] --- As JSON is an extremely simple data-interchange format, this is most likely going @@ -14,6 +15,9 @@ going to be 100% valid JSON. Luckily, it kind of speaks for itself. ```json { + "key": "value", + + "keys": "must always be enclosed in quotes (' or \")" "numbers": 0, "strings": "Hellø, wørld. All unicode is allowed, along with \"escaping\".", "has bools?": true, @@ -42,6 +46,11 @@ going to be 100% valid JSON. Luckily, it kind of speaks for itself. [0, 0, 0, 1] ] ], + + "alternative style": { + "comment": "check this out!" + , "comma position": "doesn't matter - as long as its before the value, then its valid" + , "see for rationale": "https://gist.github.com/isaacs/357981" "that was short": "And, you're done. You know know everything JSON has to offer." } From a5f41dd164ec69da6a748a50fa6c9af1b0ba6db6 Mon Sep 17 00:00:00 2001 From: Marco Scannadinari Date: Wed, 11 Jun 2014 09:55:56 +0100 Subject: [PATCH 2/3] Fix missing commas and closing braces --- json.html.markdown | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/json.html.markdown b/json.html.markdown index 28906116..6891e04e 100644 --- a/json.html.markdown +++ b/json.html.markdown @@ -17,7 +17,7 @@ going to be 100% valid JSON. Luckily, it kind of speaks for itself. { "key": "value", - "keys": "must always be enclosed in quotes (' or \")" + "keys": "must always be enclosed in quotes (' or \")", "numbers": 0, "strings": "Hellø, wørld. All unicode is allowed, along with \"escaping\".", "has bools?": true, @@ -51,6 +51,7 @@ going to be 100% valid JSON. Luckily, it kind of speaks for itself. "comment": "check this out!" , "comma position": "doesn't matter - as long as its before the value, then its valid" , "see for rationale": "https://gist.github.com/isaacs/357981" + }, "that was short": "And, you're done. You know know everything JSON has to offer." } From de369eaa29e6cd1b979014a2a23742297d8e9edf Mon Sep 17 00:00:00 2001 From: Marco Scannadinari Date: Fri, 13 Jun 2014 19:20:21 +0100 Subject: [PATCH 3/3] Remove escaped quotes and external gist link --- json.html.markdown | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/json.html.markdown b/json.html.markdown index 6891e04e..6d06ffe4 100644 --- a/json.html.markdown +++ b/json.html.markdown @@ -17,7 +17,7 @@ going to be 100% valid JSON. Luckily, it kind of speaks for itself. { "key": "value", - "keys": "must always be enclosed in quotes (' or \")", + "keys": "must always be enclosed in quotes (either double or single)", "numbers": 0, "strings": "Hellø, wørld. All unicode is allowed, along with \"escaping\".", "has bools?": true, @@ -50,7 +50,7 @@ going to be 100% valid JSON. Luckily, it kind of speaks for itself. "alternative style": { "comment": "check this out!" , "comma position": "doesn't matter - as long as its before the value, then its valid" - , "see for rationale": "https://gist.github.com/isaacs/357981" + , "another comment": "how nice" }, "that was short": "And, you're done. You know know everything JSON has to offer."