"YAML"의 두 판 사이의 차이

 
(사용자 2명의 중간 판 4개는 보이지 않습니다)
11번째 줄: 11번째 줄:
== 예시 ==
== 예시 ==
=== 리스트 ===
=== 리스트 ===
<source lang="yaml">
<syntaxhighlight lang="yaml">
--- # Favorite movies, block format
--- # Favorite movies, block format
- Casablanca
- Casablanca
18번째 줄: 18번째 줄:
--- # Shopping list, inline format
--- # Shopping list, inline format
[milk, bread, eggs]
[milk, bread, eggs]
</source>
</syntaxhighlight>


=== 해시 ===
=== 해시 ===
<source lang="yaml">
<syntaxhighlight lang="yaml">
--- # Block
--- # Block
name: John Smith
name: John Smith
27번째 줄: 27번째 줄:
--- # Inline
--- # Inline
{name: John Smith, age: 33}
{name: John Smith, age: 33}
</source>
</syntaxhighlight>


=== 블럭 리터럴 ===
=== 블럭 리터럴 ===
{{참고|YAML 블럭 리터럴}}
==== 개행 보존 ====
==== 개행 보존 ====
<source lang="yaml">
<syntaxhighlight lang="yaml">
--- |
--- |
   There was a young fellow of Warwick
   There was a young fellow of Warwick
38번째 줄: 39번째 줄:
       Have triune erection
       Have triune erection
   Ionic, Corinthian, and Doric
   Ionic, Corinthian, and Doric
</source>
</syntaxhighlight>


==== 개행 무시 ====
==== 개행 무시 ====
<source lang="yaml">
<syntaxhighlight lang="yaml">
--- >
--- >
   Wrapped text
   Wrapped text
50번째 줄: 51번째 줄:
   Blank lines denote
   Blank lines denote
   paragraph breaks
   paragraph breaks
</source>
</syntaxhighlight>


=== 해시의 리스트 ===
=== 해시의 리스트 ===
<source lang="yaml">
<syntaxhighlight lang="yaml">
- {name: John Smith, age: 33}
- {name: John Smith, age: 33}
- name: Mary Smith
- name: Mary Smith
   age: 27
   age: 27
</source>
</syntaxhighlight>
=== 리스트의 해시 ===
=== 리스트의 해시 ===
<source lang="yaml">
<syntaxhighlight lang="yaml">
men: [John Smith, Bill Jones]
men: [John Smith, Bill Jones]
women:
women:
   - Mary Smith
   - Mary Smith
   - Susan Williams
   - Susan Williams
</source>
</syntaxhighlight>


==같이 보기==
==같이 보기==
*[[JSON]]
{{z컬럼3|
*[[XML]]
* [[Plist]]
*[[AsciiDoc]]
* [[XML]]
*[[OGDL]]
* [[JSON]]
*[[Plist]]
* [[TOML]]
*[[리눅스 shyaml]]
* [[OGDL]]
* [[AsciiDoc]]
* [[리눅스 yq]]
* [[리눅스 shyaml]]
}}


==참고==
==참고==

2023년 1월 19일 (목) 23:56 기준 최신판

1 개요[ | ]

YAML (YAML Aint't Markup Language)
얘멀 /ˈjæməl/, 얘믈, 야믈
  • 데이터 교환 형식의 하나
  • 사람이 읽을 수 있도록 정한 데이터 직렬화 형식
  • C, Perl, PHP, Python, 루비, 자바스크립트 등에서 사용가능
  • 모든 데이터를 리스트, 해쉬, 스칼라 데이터의 조합으로 표현
  • 확장자: .yaml, .yml
  • 첫 릴리즈: 2001년

2 예시[ | ]

2.1 리스트[ | ]

--- # Favorite movies, block format
- Casablanca
- Spellbound
- Notorious
--- # Shopping list, inline format
[milk, bread, eggs]

2.2 해시[ | ]

--- # Block
name: John Smith
age: 33
--- # Inline
{name: John Smith, age: 33}

2.3 블럭 리터럴[ | ]

2.3.1 개행 보존[ | ]

--- |
  There was a young fellow of Warwick
  Who had reason for feeling euphoric
      For he could, by election
      Have triune erection
  Ionic, Corinthian, and Doric

2.3.2 개행 무시[ | ]

--- >
  Wrapped text
  will be folded
  into a single
  paragraph
  
  Blank lines denote
  paragraph breaks

2.4 해시의 리스트[ | ]

- {name: John Smith, age: 33}
- name: Mary Smith
  age: 27

2.5 리스트의 해시[ | ]

men: [John Smith, Bill Jones]
women:
  - Mary Smith
  - Susan Williams

3 같이 보기[ | ]

4 참고[ | ]

문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}