@@ -28,7 +28,7 @@ obvious semantics. TOML is designed to map unambiguously to a hash table. TOML
28
28
should be easy to parse into data structures in a wide variety of languages.
29
29
30
30
Table of contents
31
- -------
31
+ -----------------
32
32
33
33
- [ Example] ( #user-content-example )
34
34
- [ Spec] ( #user-content-spec )
103
103
Comment
104
104
-------
105
105
106
- A hash symbol marks the rest of the line as a comment, except when inside a string.
106
+ A hash symbol marks the rest of the line as a comment, except when inside a
107
+ string.
107
108
108
109
``` toml
109
110
# This is a full-line comment
@@ -146,8 +147,8 @@ Unspecified values are invalid.
146
147
key = # INVALID
147
148
```
148
149
149
- There must be a newline after a key/value pair.
150
- (See [ Inline Table] ( #user-content-inline-table ) for exceptions.)
150
+ There must be a newline (or EOF) after a key/value pair. (See [ Inline
151
+ Table] ( #user-content-inline-table ) for exceptions.)
151
152
152
153
```
153
154
first = "Tom" last = "Preston-Werner" # INVALID
@@ -318,9 +319,10 @@ For convenience, some popular characters have a compact escape sequence.
318
319
```
319
320
320
321
Any Unicode character may be escaped with the ` \uXXXX ` or ` \UXXXXXXXX ` forms.
321
- The escape codes must be valid Unicode [ scalar values] ( http://unicode.org/glossary/#unicode_scalar_value ) .
322
+ The escape codes must be valid Unicode [ scalar
323
+ values] ( http://unicode.org/glossary/#unicode_scalar_value ) .
322
324
323
- All other escape sequences not listed above are reserved and, if used, TOML
325
+ All other escape sequences not listed above are reserved; if they are used, TOML
324
326
should produce an error.
325
327
326
328
Sometimes you need to express passages of text (e.g. translation files) or would
@@ -538,9 +540,9 @@ sf2 = +inf # positive infinity
538
540
sf3 = -inf # negative infinity
539
541
540
542
# not a number
541
- sf4 = nan # actual sNaN/qNaN encoding is implementation specific
543
+ sf4 = nan # actual sNaN/qNaN encoding is implementation- specific
542
544
sf5 = +nan # same as `nan`
543
- sf6 = -nan # valid, actual encoding is implementation specific
545
+ sf6 = -nan # valid, actual encoding is implementation- specific
544
546
```
545
547
546
548
Boolean
@@ -554,7 +556,7 @@ bool2 = false
554
556
```
555
557
556
558
Offset Date-Time
557
- ---------------
559
+ ----------------
558
560
559
561
To unambiguously represent a specific instant in time, you may use an
560
562
[ RFC 3339] ( http://tools.ietf.org/html/rfc3339 ) formatted date-time with offset.
@@ -572,13 +574,13 @@ time with a space (as permitted by RFC 3339 section 5.6).
572
574
odt4 = 1979-05-27 07:32:00Z
573
575
```
574
576
575
- The precision of fractional seconds is implementation specific, but at least
577
+ The precision of fractional seconds is implementation- specific, but at least
576
578
millisecond precision is expected. If the value contains greater precision than
577
579
the implementation can support, the additional precision must be truncated, not
578
580
rounded.
579
581
580
582
Local Date-Time
581
- --------------
583
+ ---------------
582
584
583
585
If you omit the offset from an [ RFC 3339] ( http://tools.ietf.org/html/rfc3339 )
584
586
formatted date-time, it will represent the given date-time without any relation
@@ -591,7 +593,7 @@ ldt1 = 1979-05-27T07:32:00
591
593
ldt2 = 1979-05-27T00:32:00.999999
592
594
```
593
595
594
- The precision of fractional seconds is implementation specific, but at least
596
+ The precision of fractional seconds is implementation- specific, but at least
595
597
millisecond precision is expected. If the value contains greater precision than
596
598
the implementation can support, the additional precision must be truncated, not
597
599
rounded.
@@ -620,7 +622,7 @@ lt1 = 07:32:00
620
622
lt2 = 00:32:00.999999
621
623
```
622
624
623
- The precision of fractional seconds is implementation specific, but at least
625
+ The precision of fractional seconds is implementation- specific, but at least
624
626
millisecond precision is expected. If the value contains greater precision than
625
627
the implementation can support, the additional precision must be truncated, not
626
628
rounded.
@@ -686,7 +688,8 @@ key1 = "another string"
686
688
key2 = 456
687
689
```
688
690
689
- Naming rules for tables are the same as for keys (see definition of Keys above).
691
+ Naming rules for tables are the same as for keys (see definition of
692
+ [ Keys] ( #user-content-keys ) above).
690
693
691
694
``` toml
692
695
[dog ."tater .man" ]
@@ -786,8 +789,8 @@ Inline Table
786
789
787
790
Inline tables provide a more compact syntax for expressing tables. They are
788
791
especially useful for grouped data that can otherwise quickly become verbose.
789
- Inline tables are enclosed in curly braces ` { ` and ` } ` . Within the braces, zero
790
- or more comma separated key/value pairs may appear. Key/value pairs take the
792
+ Inline tables are enclosed in curly braces: ` { ` and ` } ` . Within the braces, zero
793
+ or more comma- separated key/value pairs may appear. Key/value pairs take the
791
794
same form as key/value pairs in standard tables. All value types are allowed,
792
795
including inline tables.
793
796
@@ -818,7 +821,6 @@ y = 2
818
821
819
822
[animal ]
820
823
type.name = " pug"
821
-
822
824
```
823
825
824
826
Inline tables fully define the keys and sub-tables within them. New keys and
@@ -842,7 +844,7 @@ type.name = "Nail"
842
844
Array of Tables
843
845
---------------
844
846
845
- The last type that has not yet been expressed is an array of tables. These can
847
+ The last type that has not yet been described is an array of tables. These can
846
848
be expressed by using a table name in double brackets. Under that, and until the
847
849
next table or EOF are the key/values of that table. Each table with the same
848
850
double bracketed name will be an element in the array of tables. The tables are
@@ -1030,15 +1032,15 @@ Documentation, bug reports, pull requests, and all other contributions
1030
1032
are welcome!
1031
1033
1032
1034
Wiki
1033
- ----------------------------------------------------------------------
1035
+ ----
1034
1036
1035
1037
We have an [ Official TOML Wiki] ( https://github.com/toml-lang/toml/wiki ) that
1036
1038
catalogs the following:
1037
1039
1038
1040
* Projects using TOML
1039
1041
* Implementations
1040
1042
* Validators
1041
- * Language agnostic test suite for TOML decoders and encoders
1043
+ * Language- agnostic test suite for TOML decoders and encoders
1042
1044
* Editor support
1043
1045
* Encoders
1044
1046
* Converters
0 commit comments