From cc788d516334d7c53d15096d751c5e6ed26b6d98 Mon Sep 17 00:00:00 2001 From: Aleksandras Date: Fri, 25 Aug 2023 18:03:32 +0300 Subject: [PATCH 1/2] `,` --- 1-js/05-data-types/12-json/article.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/1-js/05-data-types/12-json/article.md b/1-js/05-data-types/12-json/article.md index 25bb52fe3b..3afdecf7aa 100644 --- a/1-js/05-data-types/12-json/article.md +++ b/1-js/05-data-types/12-json/article.md @@ -441,11 +441,11 @@ Here are typical mistakes in hand-written JSON (sometimes we have to write it fo ```js let json = `{ - *!*name*/!*: "John", // mistake: property name without quotes - "surname": *!*'Smith'*/!*, // mistake: single quotes in value (must be double) - *!*'isAdmin'*/!*: false // mistake: single quotes in key (must be double) - "birthday": *!*new Date(2000, 2, 3)*/!*, // mistake: no "new" is allowed, only bare values - "friends": [0,1,2,3] // here all fine + *!*name*/!*: "John", // mistake: property name without quotes + "surname": *!*'Smith'*/!*, // mistake: single quotes in value (must be double) + *!*'isAdmin'*/!*: false, // mistake: single quotes in key (must be double) + "birthday": *!*new Date(2000, 2, 3)*/!*, // mistake: no "new" is allowed, only bare values + "friends": [0,1,2,3] // here all fine }`; ``` From 78a5ab59fb20b90ea84fe0dfa299f22b407738cf Mon Sep 17 00:00:00 2001 From: Aleksandras Date: Mon, 28 Aug 2023 22:41:40 +0300 Subject: [PATCH 2/2] enhancement --- 1-js/05-data-types/12-json/article.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/1-js/05-data-types/12-json/article.md b/1-js/05-data-types/12-json/article.md index 3afdecf7aa..8fcc7b96d0 100644 --- a/1-js/05-data-types/12-json/article.md +++ b/1-js/05-data-types/12-json/article.md @@ -445,7 +445,8 @@ let json = `{ "surname": *!*'Smith'*/!*, // mistake: single quotes in value (must be double) *!*'isAdmin'*/!*: false, // mistake: single quotes in key (must be double) "birthday": *!*new Date(2000, 2, 3)*/!*, // mistake: no "new" is allowed, only bare values - "friends": [0,1,2,3] // here all fine + "gender": "male"*!* */!* // mistake: missing comma after non-last property + "friends": [0,1,2,3]*!*,*/!* // mistake: there should not be a comma after the last property }`; ```