[toml/en] change toml from 0.4.0 to 1.0.0 (#4690)

This commit is contained in:
Luke Harold Miles 2024-05-12 23:41:45 -07:00 committed by GitHub
parent 9d1ddbea04
commit 5ffa5d8356
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -9,8 +9,7 @@ TOML stands for Tom's Obvious, Minimal Language. It is a data serialisation lang
It is an alternative to YAML and JSON. It aims to be more human friendly than JSON and simpler that YAML. TOML is designed to map unambiguously to a hash table. TOML should be easy to parse into data structures in a wide variety of languages. It is an alternative to YAML and JSON. It aims to be more human friendly than JSON and simpler that YAML. TOML is designed to map unambiguously to a hash table. TOML should be easy to parse into data structures in a wide variety of languages.
Be warned, TOML's spec is still changing a lot. Until it's marked as 1.0, you This document follows [TOML v1.0.0](https://toml.io/en/v1.0.0). Future [changes](https://github.com/toml-lang/toml/blob/main/CHANGELOG.md) are expected to be minor and backwards-compatible.
should assume that it is unstable and act accordingly. This document follows TOML v0.4.0.
```toml ```toml
# Comments in TOML look like this. # Comments in TOML look like this.
@ -32,7 +31,8 @@ boolean = true
dateTime = 1979-05-27T07:32:00-08:00 dateTime = 1979-05-27T07:32:00-08:00
scientificNotation = 1e+12 scientificNotation = 1e+12
"key can be quoted" = true # Both " and ' are fine "key can be quoted" = true # Both " and ' are fine
"key may contain" = "letters, numbers, underscores, and dashes" "unquoted key may contain" = "letters, numbers, underscores, and dashes"
other_kêys = "are permitted by spec but most implementations don't actually permit them"
# A bare key must be non-empty, but an empty quoted key is allowed # A bare key must be non-empty, but an empty quoted key is allowed
"" = "blank" # VALID but discouraged "" = "blank" # VALID but discouraged
@ -205,8 +205,12 @@ c = 2
# Inline table # # Inline table #
################ ################
inlineTables = { areEnclosedWith = "{ and }", mustBeInline = true } inlineTables = { areEnclosedWith = "{ and }", a = { b = { c = { d = 1 } } } }
point = { x = 1, y = 2 } point = { x = 1, y = 2 }
usingMultiple = {
lines = "discouraged!",
instead = "use normal TOML tables",
}
################### ###################
# Array of Tables # # Array of Tables #