1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44
|
{'table': {'key': 'value',
'subtable': {'key': 'another value'},
'inline': {'name': {'first': 'Tom', 'last': 'Preston-Werner'},
'point': {'x': 1, 'y': 2}}},
'x': {'y': {'z': {'w': {}}}},
'string': {'basic': {'basic': 'I\'m a string. "You can quote me". Name\tJosé\nLocation\tSF.'},
'multiline': {'key1': 'One\nTwo',
'key2': 'One\nTwo',
'key3': 'One\nTwo',
'continued': {'key1': 'The quick brown fox jumps over the lazy dog.',
'key2': 'The quick brown fox jumps over the lazy dog.',
'key3': 'The quick brown fox jumps over the lazy dog.'}},
'literal': {'winpath': 'C:\\Users\\nodejs\\templates',
'winpath2': '\\\\ServerX\\admin$\\system32\\',
'quoted': 'Tom "Dubs" Preston-Werner',
'regex': '<\\i\\c*\\s*>',
'multiline': {'regex2': "I [dw]on't need \\d{2} apples",
'lines': 'The first newline is\ntrimmed in raw strings.\n All other whitespace\n is preserved.\n'}}},
'integer': {'key1': 99,
'key2': 42,
'key3': 0,
'key4': -17,
'underscores': {'key1': 1000, 'key2': 5349221, 'key3': 12345}},
'float': {'fractional': {'key1': 1.0, 'key2': 3.1415, 'key3': -0.01},
'exponent': {'key1': 5e+22, 'key2': 1000000.0, 'key3': -0.02},
'both': {'key': 6.626e-34},
'underscores': {'key1': 9224617.445991227, 'key2': inf}},
'boolean': {'True': True, 'False': False},
'datetime': {'key1': datetime.datetime(1979, 5, 27, 7, 32, tzinfo=<toml.TomlTz object at 0x10f814f98>),
'key2': datetime.datetime(1979, 5, 27, 0, 32, tzinfo=<toml.TomlTz object at 0x10f81b470>),
'key3': datetime.datetime(1979, 5, 27, 0, 32, 0, 999999, tzinfo=<toml.TomlTz object at 0x10f81b518>)},
'array': {'key1': [1, 2, 3],
'key2': ['red', 'yellow', 'green'],
'key3': [[1, 2], [3, 4, 5]],
'key4': [[1, 2], ['a', 'b', 'c']],
'key5': [1, 2, 3],
'key6': [1, 2]},
'products': [{'name': 'Hammer', 'sku': 738594937},
{},
{'name': 'Nail', 'sku': 284758393, 'color': 'gray'}],
'fruit': [{'name': 'apple',
'physical': {'color': 'red', 'shape': 'round'},
'variety': [{'name': 'red delicious'}, {'name': 'granny smith'}]},
{'name': 'banana', 'variety': [{'name': 'plantain'}]}]}
|