From c581ac7c5b0ba9552a0e34f467c4f62050e0c455 Mon Sep 17 00:00:00 2001 From: DevJo Date: Mon, 13 Dec 2021 19:50:12 +0900 Subject: remove: notranslate in web/javascript/reference/global_objects --- .../reference/global_objects/json/stringify/index.html | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'files/ko/web/javascript/reference/global_objects/json/stringify') diff --git a/files/ko/web/javascript/reference/global_objects/json/stringify/index.html b/files/ko/web/javascript/reference/global_objects/json/stringify/index.html index 12de82705b..e9b9f8667f 100644 --- a/files/ko/web/javascript/reference/global_objects/json/stringify/index.html +++ b/files/ko/web/javascript/reference/global_objects/json/stringify/index.html @@ -18,7 +18,7 @@ translation_of: Web/JavaScript/Reference/Global_Objects/JSON/stringify

구문

-
JSON.stringify(value[, replacer[, space]])
+
JSON.stringify(value[, replacer[, space]])

매개변수

@@ -54,7 +54,7 @@ translation_of: Web/JavaScript/Reference/Global_Objects/JSON/stringify
  • 열거 불가능한 속성들은 무시된다.
  • -
    JSON.stringify({});                  // '{}'
    +
    JSON.stringify({});                  // '{}'
     JSON.stringify(true);                // 'true'
     JSON.stringify('foo');               // '"foo"'
     JSON.stringify([1, 'false', false]); // '[1,"false",false]'
    @@ -104,7 +104,7 @@ JSON.stringify( Object.create(null, { x: { value: 'x', enumerable: false }, y: {
     
     

    함수에 대한 예제

    -
    function replacer(key, value) {
    +
    function replacer(key, value) {
       if (typeof value === "string") {
         return undefined;
       }
    @@ -121,7 +121,7 @@ var jsonString = JSON.stringify(foo, replacer);
     
     

    replacer 가 배열인 경우, 그 배열의 값은 JSON 문자열의 결과에 포함되는 속성의 이름을 나타낸다.

    -
    JSON.stringify(foo, ['week', 'month']);
    +
    JSON.stringify(foo, ['week', 'month']);
     // '{"week":45,"month":7}', 단지 "week" 와 "month" 속성을 포함한다
     
    @@ -129,7 +129,7 @@ var jsonString = JSON.stringify(foo, replacer);

    space 매개변수는 최종 문자열의 간격을 제어한다. 숫자일 경우 최대 10자 만큼의 공백 문자 크기로 들여쓰기되며, 문자열인 경우 해당 문자열 또는 처음 10자 만큼 들여쓰기 된다.

    -
    JSON.stringify({ a: 2 }, null, ' ');
    +
    JSON.stringify({ a: 2 }, null, ' ');
     // '{
     //  "a": 2
     // }'
    @@ -137,7 +137,7 @@ var jsonString = JSON.stringify(foo, replacer);
     
     

    '\t'를 사용하면 일반적으로 들여쓰기 된 코드스타일과 유사함.

    -
    JSON.stringify({ uno: 1, dos: 2 }, null, '\t');
    +
    JSON.stringify({ uno: 1, dos: 2 }, null, '\t');
     // returns the string:
     // '{
     //     "uno": 1,
    @@ -149,7 +149,7 @@ var jsonString = JSON.stringify(foo, replacer);
     
     

    If an object being stringified has a property named toJSON whose value is a function, then the toJSON() method customizes JSON stringification behavior: instead of the object being serialized, the value returned by the toJSON() method when called will be serialized. For example:

    -
    var obj = {
    +
    var obj = {
       foo: 'foo',
       toJSON: function() {
         return 'bar';
    @@ -167,7 +167,7 @@ JSON.stringify({ x: obj }); // '{"x":"bar"}'
     

    Functions are not a valid JSON data type so they will not work. However, they can be displayed if first converted to a string (e.g. in the replacer), via the function's toString method. Also, some objects like {{jsxref("Date")}} will be a string after {{jsxref("JSON.parse()")}}.

    -
    // Creating an example of JSON
    +
    // Creating an example of JSON
     var session = {
       'screens': [],
       'state': true
    -- 
    cgit v1.2.3-54-g00ecf