From 354543c97dbbc7296f68c35db462a9dac30cb9b1 Mon Sep 17 00:00:00 2001 From: Emily Aviva Kapor-Mater Date: Mon, 19 Mar 2018 17:28:06 -0700 Subject: add clarifying example and text for date/time offsets --- toml.html.markdown | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'toml.html.markdown') diff --git a/toml.html.markdown b/toml.html.markdown index 980563f9..39caaa23 100755 --- a/toml.html.markdown +++ b/toml.html.markdown @@ -102,9 +102,10 @@ boolMustBeLowercase = true # Datetime # ############ -date1 = 1979-05-27T07:32:00Z # follows the RFC 3339 spec -date2 = 1979-05-27T07:32:00 # without offset -date3 = 1979-05-27 # without offset nor time +date1 = 1979-05-27T07:32:00Z # UTC time, following RFC 3339/ISO 8601 spec +date2 = 1979-05-26T15:32:00+08:00 # with RFC 3339/ISO 8601 offset +date3 = 1979-05-27T07:32:00 # without offset +date4 = 1979-05-27 # without offset or time #################### # COLLECTION TYPES # -- cgit v1.2.3 From d490ed15897be373b482abf50ea3828059ac01c9 Mon Sep 17 00:00:00 2001 From: Divay Prakash Date: Wed, 15 Aug 2018 17:26:28 +0530 Subject: Fix build error in 'build/docs/toml/index.html' --- toml.html.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'toml.html.markdown') diff --git a/toml.html.markdown b/toml.html.markdown index 39caaa23..814e57e7 100755 --- a/toml.html.markdown +++ b/toml.html.markdown @@ -12,7 +12,7 @@ It is an alternative to YAML and JSON. It aims to be more human friendly than JS Be warned, TOML's spec is still changing a lot. Until it's marked as 1.0, you should assume that it is unstable and act accordingly. This document follows TOML v0.4.0. -```toml +``` # Comments in TOML look like this. ################ -- cgit v1.2.3 From 220005db0c34107410080fd63e669a38375cc1b5 Mon Sep 17 00:00:00 2001 From: Anthony Anaedu Date: Tue, 23 Apr 2019 12:05:48 -0700 Subject: update toml doc and fix typos --- toml.html.markdown | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'toml.html.markdown') diff --git a/toml.html.markdown b/toml.html.markdown index 814e57e7..385a2437 100755 --- a/toml.html.markdown +++ b/toml.html.markdown @@ -32,7 +32,7 @@ boolean = true dateTime = 1979-05-27T07:32:00-08:00 scientificNotation = 1e+12 "key can be quoted" = true # Both " and ' are fine -"key may contains" = "letters, numbers, underscores, and dashes" +"key may contain" = "letters, numbers, underscores, and dashes" # A bare key must be non-empty, but an empty quoted key is allowed "" = "blank" # VALID but discouraged @@ -225,26 +225,26 @@ color = "gray" # sub-table will belong to the nearest table element above it. [[fruit]] - name = "apple" + name = "apple" # I am a property in fruit table/map - [fruit.Geometry] + [fruit.geometry] shape = "round" - note = "I am an fruit's property" + note = "I am a property in geometry table/map" [[fruit.color]] name = "red" - note = "I am an array's item in apple" + note = "I am an array item in apple fruit's table/map" [[fruit.color]] name = "green" - note = "I am in the same array than red" + note = "I am in the same array as red" [[fruit]] name = "banana" [[fruit.color]] name = "yellow" - note = "I am an array's item too but banana's one" + note = "I am an array item in banana fruit's table/map" ``` In JSON land, this code will be: -- cgit v1.2.3 From bb97b7c3e4025ed92d23e72335efc3e685ce3fef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D9=81=D8=A7=D8=B1=D8=B3?= Date: Thu, 30 Jan 2020 20:24:47 -0500 Subject: Fixed Typo and added a few examples --- toml.html.markdown | 25 +++++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) (limited to 'toml.html.markdown') 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 { -- cgit v1.2.3 From 70e59f7f3d1229d30f11683e3b0a86bdfdf40cd9 Mon Sep 17 00:00:00 2001 From: khswong <42327203+khswong@users.noreply.github.com> Date: Fri, 31 Jan 2020 16:30:16 -0800 Subject: [toml/en] Fix Formatting and Syntax Highlighting Switching between json code block and toml code block caused it to render improperly. Fixed. --- toml.html.markdown | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'toml.html.markdown') diff --git a/toml.html.markdown b/toml.html.markdown index 4c76ee91..2b234965 100755 --- a/toml.html.markdown +++ b/toml.html.markdown @@ -12,7 +12,7 @@ It is an alternative to YAML and JSON. It aims to be more human friendly than JS Be warned, TOML's spec is still changing a lot. Until it's marked as 1.0, you should assume that it is unstable and act accordingly. This document follows TOML v0.4.0. -``` +```toml # Comments in TOML look like this. ################ @@ -223,8 +223,8 @@ emptyTableAreAllowed = true name = "Nail" sku = 284758393 color = "gray" - -# JSON-land styled structure: +``` +The equivalent in JSON would be: ```json { "products": [ @@ -242,6 +242,8 @@ color = "gray" ] } ``` + +```toml # You can create nested arrays of tables as well. Each double-bracketed # sub-table will belong to the nearest table element above it. @@ -266,11 +268,11 @@ color = "gray" [[fruit.color]] name = "yellow" note = "I am an array item in banana fruit's table/map" -``` - -# In JSON land, this code will be: +``` +The equivalent in JSON would be: ```json + { "fruit": [ { -- cgit v1.2.3