TOML

위키백과, 우리 모두의 백과사전.

TOML
파일 확장자.toml
인터넷 미디어 타입미등록[1]
개발톰 프레스턴-워너
커뮤니티
발표일2013년 2월 23일(11년 전)(2013-02-23)
최신 버전
v1.0.0
(2021년 1월 11일(3년 전)(2021-01-11))
포맷 종류데이터 교환
웹사이트toml.io 위키데이터에서 편집하기

TOML구성 파일을 위한 파일 형식이다. 시맨틱스를 최소한으로 쉽게 읽기/쓰기하도록 고안되었으며 딕셔너리에 모호함 없이 매핑하도록 설계되었다. 사양은 오픈 소스이며 커뮤니티 기여를 받는다. TOML은 수많은 소프트웨어 프로젝트에 사용되며[2][3][4] 수많은 프로그래밍 언어에 구현되어 있다.[5] TOML이라는 이름은 "Tom's Obvious, Minimal Language"의 준말이며[6] 개발자 톰 프레스턴-워너를 가리킨다.

문법[편집]

TOML의 문법은 주로 키 = 값 쌍, [섹션 이름], 그리고 #(주석)으로 이루어져 있다. TOML의 문법은 다소 INI 파일의 문법과 유사하지만 형식적인 사양을 포함하고 있다.

사양에는 지원 자료형 목록을 포함한다: String, Integer, Float, Boolean, Datetime, Array, Table.

예시[편집]

# This is a TOML document.

title = "ImpalaPay Co."

[owner]
name = "Impala Co."
establishment=""

[database]
server = "192.168.1.1"
ports = [ 8000, 8001, 8002 ]
connection_max = 5000
enabled = true

[servers]

  # Indentation (tabs and/or spaces) is allowed but not required
  [servers.alpha]
  ip = "10.0.0.1"
  dc = "eqdc10"

  [servers.beta]
  ip = "10.0.0.2"
  dc = "eqdc10"

[clients]
data = [ ["gamma", "delta"], [1, 2] ]

# Line breaks are OK when inside arrays
hosts = [
  "alpha",
  "omega"
]

같이 보기[편집]

각주[편집]

  1. There is a mime type proposal for TOML consisting in application/toml, but this has never been officially registered among IANA's Media Types.
  2. “The Manifest Format - The Cargo Book”. 《doc.rust-lang.org》. 
  3. Drew DeVault (2021년 7월 28일). “My wish-list for the next YAML”. YAML is both universally used, and universally reviled. It has a lot of problems, but it also is so useful in solving specific tasks that it’s hard to replace. Some new kids on the block (such as TOML) have successfully taken over a portion of its market share, but it remains in force in places where those alternatives show their weaknesses. 
  4. “TOML: Tom's Obvious Minimal Language”. 《toml.io》. 2022년 8월 8일에 확인함. 
  5. “toml-lang/toml”. 《GitHub》. 2022년 5월 23일. 
  6. “Learn toml in Y Minutes”. 《learnxinyminutes.com》. 2022년 8월 8일에 확인함. 

외부 링크[편집]