Skip to content

Commit 7f3c99b

Browse files
committed
data-types/json 아티클 충돌 해결
1 parent 692bdfb commit 7f3c99b

1 file changed

Lines changed: 2 additions & 20 deletions

File tree

1-js/05-data-types/12-json/article.md

Lines changed: 2 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,7 @@ alert(user); // {name: "John", age: 30}
2727

2828
## JSON.stringify
2929

30-
<<<<<<< HEAD
3130
[JSON](http://en.wikipedia.org/wiki/JSON) (JavaScript Object Notation)은 값이나 객체를 나타내주는 범용 포맷으로, [RFC 4627](http://tools.ietf.org/html/rfc4627) 표준에 정의되어 있습니다. JSON은 본래 자바스크립트에서 사용할 목적으로 만들어진 포맷입니다. 그런데 라이브러리를 사용하면 자바스크립트가 아닌 언어에서도 JSON을 충분히 다룰 수 있어서, JSON을 데이터 교환 목적으로 사용하는 경우가 많습니다. 특히 클라이언트 측 언어가 자바스크립트일 때 말이죠. 서버 측 언어는 무엇이든 상관없습니다.
32-
=======
33-
The [JSON](https://en.wikipedia.org/wiki/JSON) (JavaScript Object Notation) is a general format to represent values and objects. It is described as in [RFC 4627](https://tools.ietf.org/html/rfc4627) standard. Initially it was made for JavaScript, but many other languages have libraries to handle it as well. So it's easy to use JSON for data exchange when the client uses JavaScript and the server is written on Ruby/PHP/Java/Whatever.
34-
>>>>>>> upstream/master
3531

3632
자바스크립트가 제공하는 JSON 관련 메서드는 아래와 같습니다.
3733

@@ -108,15 +104,9 @@ JSON은 데이터 교환을 목적으로 만들어진 언어에 종속되지 않
108104

109105
`JSON.stringify` 호출 시 무시되는 프로퍼티는 아래와 같습니다.
110106

111-
<<<<<<< HEAD
112107
- 함수 프로퍼티 (메서드)
113108
- 심볼형 프로퍼티 (키가 심볼인 프로퍼티)
114109
- 값이 `undefined`인 프로퍼티
115-
=======
116-
- Function properties (methods).
117-
- Symbolic keys and values.
118-
- Properties that store `undefined`.
119-
>>>>>>> upstream/master
120110

121111
```js run
122112
let user = {
@@ -338,13 +328,9 @@ alert(JSON.stringify(user, null, 2));
338328
*/
339329
```
340330

341-
<<<<<<< HEAD
342-
이처럼 매개변수 `space`는 로깅이나 가독성을 높이는 목적으로 사용됩니다.
343-
=======
344-
The third argument can also be a string. In this case, the string is used for indentation instead of a number of spaces.
331+
세 번째 인수로 문자열을 전달할 수도 있습니다. 이 경우 공백 개수 대신 해당 문자열이 들여쓰기에 사용됩니다.
345332

346-
The `space` parameter is used solely for logging and nice-output purposes.
347-
>>>>>>> upstream/master
333+
이처럼 매개변수 `space`는 로깅이나 가독성을 높이는 목적으로 사용됩니다.
348334

349335
## 커스텀 "toJSON"
350336

@@ -464,11 +450,7 @@ let json = `{
464450

465451
JSON은 주석을 지원하지 않는다는 점도 기억해 놓으시기 바랍니다. 주석을 추가하면 유효하지 않은 형식이 됩니다.
466452

467-
<<<<<<< HEAD
468453
키를 큰따옴표로 감싸지 않아도 되고 주석도 지원해주는 [JSON5](http://json5.org/)라는 포맷도 있는데, 이 포맷은 자바스크립트 명세서에서 정의하지 않은 독자적인 라이브러리입니다.
469-
=======
470-
There's another format named [JSON5](https://json5.org/), which allows unquoted keys, comments etc. But this is a standalone library, not in the specification of the language.
471-
>>>>>>> upstream/master
472454

473455
JSON 포맷이 까다로운 규칙을 가지게 된 이유는 개발자의 귀차니즘 때문이 아니고, 쉽고 빠르며 신뢰할 수 있을 만한 파싱 알고리즘을 구현하기 위해서입니다.
474456

0 commit comments

Comments
 (0)