diff options
Diffstat (limited to 'json.html.markdown')
| -rw-r--r-- | json.html.markdown | 15 | 
1 files changed, 12 insertions, 3 deletions
| diff --git a/json.html.markdown b/json.html.markdown index 6aff2ce2..060e9c3d 100644 --- a/json.html.markdown +++ b/json.html.markdown @@ -4,14 +4,23 @@ 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  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. + +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  { @@ -49,7 +58,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 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"    }, | 
