From 0be77b09a04945571f63ccb3313c0cb04fb4763a Mon Sep 17 00:00:00 2001 From: Vse Mozhe Buty Date: Thu, 15 Oct 2020 04:44:52 +0300 Subject: [PATCH] Clarify some things in 1.5.12 --- 1-js/05-data-types/12-json/article.md | 5 ++++- 1 file changed, 4 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 a5f2974a..425022f8 100644 --- a/1-js/05-data-types/12-json/article.md +++ b/1-js/05-data-types/12-json/article.md @@ -105,7 +105,7 @@ JSON is data-only language-independent specification, so some JavaScript-specifi Namely: - Function properties (methods). -- Symbolic properties. +- Symbolic keys and values. - Properties that store `undefined`. ```js run @@ -276,6 +276,7 @@ name: John name: Alice place: [object Object] number: 23 +occupiedBy: [object Object] */ ``` @@ -328,6 +329,8 @@ alert(JSON.stringify(user, null, 2)); */ ``` +The third argument can also be a string. In this case, the string is used for indentation instead of a number of spaces. + The `space` parameter is used solely for logging and nice-output purposes. ## Custom "toJSON"