From 960ee4a1856db8eadb96277bb2422edfa8f2a81c Mon Sep 17 00:00:00 2001 From: Gabriel Halley Date: Wed, 7 Oct 2015 23:11:24 -0400 Subject: removing whitespace all over --- json.html.markdown | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'json.html.markdown') diff --git a/json.html.markdown b/json.html.markdown index 47a8cb21..6aff2ce2 100644 --- a/json.html.markdown +++ b/json.html.markdown @@ -16,7 +16,7 @@ going to be 100% valid JSON. Luckily, it kind of speaks for itself. ```json { "key": "value", - + "keys": "must always be enclosed in double quotes", "numbers": 0, "strings": "Hellø, wørld. All unicode is allowed, along with \"escaping\".", @@ -46,7 +46,7 @@ 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 it's before the value, then it's valid" -- cgit v1.2.3 From 617599a527a7ee9e3d01a21f11338a1cba3e1eb5 Mon Sep 17 00:00:00 2001 From: himanshu81494 Date: Thu, 8 Oct 2015 15:49:51 +0530 Subject: Update json.html.markdown --- json.html.markdown | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'json.html.markdown') diff --git a/json.html.markdown b/json.html.markdown index 6aff2ce2..f4adfc8b 100644 --- a/json.html.markdown +++ b/json.html.markdown @@ -4,6 +4,7 @@ filename: learnjson.json contributors: - ["Anna Harren", "https://github.com/iirelu"] - ["Marco Scannadinari", "https://github.com/marcoms"] + - ["himanshu", "https://github.com/himanshu81494"] --- As JSON is an extremely simple data-interchange format, this is most likely going @@ -13,6 +14,11 @@ JSON in its purest form has no actual comments, but most parsers will accept C-style (`//`, `/* */`) comments. For the purposes of this, however, everything is going to be 100% valid JSON. Luckily, it kind of speaks for itself. +Data types supported by JSON includes: numbers, string, boolean, array, object and null. +Supporting browsers are: Firefox(Mozilla) 3.5, Internet Explorer 8, Chrome, Opera 10, Safari 4. +JSON file type for JSON files is ".json". The MIME type for JSON text is "application/json" +Drawbacks of JSON include lack of type definition and some sort of DTD. + ```json { "key": "value", -- cgit v1.2.3 From 7fd149485e0cbef6fc57206cb1377f261ed70278 Mon Sep 17 00:00:00 2001 From: Martin N Date: Fri, 9 Oct 2015 07:39:22 +0000 Subject: Mention of trailing commas in JSON and that they should be avoided --- json.html.markdown | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'json.html.markdown') diff --git a/json.html.markdown b/json.html.markdown index 6aff2ce2..a85cecc4 100644 --- a/json.html.markdown +++ b/json.html.markdown @@ -10,8 +10,11 @@ As JSON is an extremely simple data-interchange format, this is most likely goin to be the simplest Learn X in Y Minutes ever. JSON in its purest form has no actual comments, but most parsers will accept -C-style (`//`, `/* */`) comments. For the purposes of this, however, everything is -going to be 100% valid JSON. Luckily, it kind of speaks for itself. +C-style (`//`, `/* */`) comments. Some parsers also tolerate a trailing comma +(i.e. a comma after the last element of an array or the after the last property of an object), +but they should be avoided for better compatibility. + +For the purposes of this, however, everything is going to be 100% valid JSON. Luckily, it kind of speaks for itself. ```json { -- cgit v1.2.3 From 4c27047a9748c0d3197dc63de34cc8bebf03633f Mon Sep 17 00:00:00 2001 From: Vojta Svoboda Date: Fri, 9 Oct 2015 11:27:19 +0200 Subject: [json/en] Typo --- json.html.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'json.html.markdown') diff --git a/json.html.markdown b/json.html.markdown index a85cecc4..a1629137 100644 --- a/json.html.markdown +++ b/json.html.markdown @@ -14,7 +14,7 @@ C-style (`//`, `/* */`) comments. Some parsers also tolerate a trailing comma (i.e. a comma after the last element of an array or the after the last property of an object), but they should be avoided for better compatibility. -For the purposes of this, however, everything is going to be 100% valid JSON. Luckily, it kind of speaks for itself. +For the purposes of this, however, everything is going to be 100% valid JSON. Luckily, it kind of speaks for itself. ```json { -- cgit v1.2.3 From 0e330607dfa9e47db7aa4271973ed74631d926a2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Wo=C5=BAniczak?= Date: Tue, 13 Oct 2015 22:02:06 +0200 Subject: Fixed incorrect information about commas in JSON doc --- json.html.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'json.html.markdown') diff --git a/json.html.markdown b/json.html.markdown index b5e36090..060e9c3d 100644 --- a/json.html.markdown +++ b/json.html.markdown @@ -58,7 +58,7 @@ Drawbacks of JSON include lack of type definition and some sort of DTD. "alternative style": { "comment": "check this out!" - , "comma position": "doesn't matter - as long as it's before the value, then it's valid" + , "comma position": "doesn't matter - as long as it's before the next key, then it's valid" , "another comment": "how nice" }, -- cgit v1.2.3