# This is a TOML document. Boom. title = "TOML Example" quoteExample = "I'm a string. \"You can quote me\". Name\tJos\u00E9\nLocation\tSF." [owner] name = "Lance Uppercut" dob = 1979-05-27T07:32:00-08:00 # First class dates? Why not? [database] server = "192.168.1.1" ports = [ 8001, 8001, 8002 ] connection_max = 5000 enabled = true [servers] # You can indent as you please. Tabs or spaces. TOML don't care. [servers.alpha] ip = "10.0.0.1" dc = "eqdc10" [servers.beta] ip = "10.0.0.2" dc = "eqdc10" [clients] data = [ ["gamma", "delta"], [1, 2] ] # arrays? # Line breaks are OK when inside arrays hosts = [ "alpha", "omega" ] key1 = """ Roses are red Violets are blue""" key2 = """ The quick brown \ fox jumps over \ the lazy dog.""" # What you see is what you get. winpath = 'C:\Users\nodejs\templates' winpath2 = '\\ServerX\admin$\system32\' quoted = 'Tom "Dubs" Preston-Werner' regex = '<\i\c*\s*>' regex2 = '''I [dw]on't need \d{2} apples''' lines = ''' The first newline is preserved. ''' a = +99 a= 42 a= 0 a= -17 # fractional a=+1.0 a=3.1415 a=-0.01 # exponent a=5e+22 a=1e6 a=-2E-2 # both a=6.626e-34 a=true a=false a = "what" a = 5 key = [ 1, 2, 3 ] key = [ 1, 2, # this is ok ] a=1979-05-27T07:32:00Z a = 1979-05-27T00:32:00-07:00 a =1979-05-27T00:32:00.999999-07:00 a=[ 1, 2, 3 ] a=[ "red", "yellow", "green" ] a=[ [ 1, 2 ], [3, 4, 5] ] a=[ [ 1, 2 ], ["a", "b", "c"] ] # this is ok a=[ 1, 2.0 ] # note: this is NOT ok [[Array.of.table]] [table] key = "value" bare_key = "value" bare-key = "value" 1234 = "value" [inline_tables] table1 = { key = "value" } table2 = { key1 = "value1", key2 = "value2" } "127.0.0.1" = "value" "character encoding" = "value" "ʎǝʞ" = "value" 'key2' = "value" 'quoted "value"' = "value" = "no key name" # INVALID "" = "blank" # VALID but discouraged '' = 'blank' # VALID but discouraged