diff options
author | Max Schumacher <maximilianbschumacher@gmail.com> | 2020-01-31 09:05:07 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-01-31 09:05:07 +0100 |
commit | f2848760ad995e68840edb1c7159e3f0492c64ef (patch) | |
tree | e00b4a28b9fccfb7f995ac72ec3e27cc2c2bdb88 | |
parent | 1ada1d35bb0d34afe41451c4921a7bb6c7ebe259 (diff) | |
parent | bb97b7c3e4025ed92d23e72335efc3e685ce3fef (diff) |
Merge pull request #3834 from serafss2/patch-1
[toml/en] Fixed Typo and added a few examples
-rwxr-xr-x | toml.html.markdown | 25 |
1 files changed, 23 insertions, 2 deletions
diff --git a/toml.html.markdown b/toml.html.markdown index 385a2437..4c76ee91 100755 --- a/toml.html.markdown +++ b/toml.html.markdown @@ -117,7 +117,7 @@ date4 = 1979-05-27 # without offset or time array1 = [ 1, 2, 3 ] array2 = [ "Commas", "are", "delimiters" ] -array3 = [ "Don't mixed", "different", "types" ] +array3 = [ "Don't mix", "different", "types" ] array4 = [ [ 1.2, 2.4 ], ["all", 'strings', """are the same""", '''type'''] ] array5 = [ "Whitespace", "is", "ignored" @@ -171,6 +171,9 @@ c = 1 [a] d = 2 +# Will generate the following in JSON: +# { "a": {"b": {"c": 1}, "d": 2 } } + # You cannot define any key or table more than once. Doing so is invalid. # DO NOT DO THIS @@ -221,6 +224,24 @@ name = "Nail" sku = 284758393 color = "gray" +# JSON-land styled structure: +```json +{ + "products": [ + { + "name": "array of table", + "sku": 7385594937, + "emptyTableAreAllowed": true + }, + {}, + { + "name": "Nail", + "sku": 284758393, + "color": "gray" + } + ] +} +``` # You can create nested arrays of tables as well. Each double-bracketed # sub-table will belong to the nearest table element above it. @@ -247,7 +268,7 @@ color = "gray" note = "I am an array item in banana fruit's table/map" ``` -In JSON land, this code will be: +# In JSON land, this code will be: ```json { |