[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/tomelr 28642f2e78 05/84: fix: dates will be strings in
From: |
ELPA Syncer |
Subject: |
[elpa] externals/tomelr 28642f2e78 05/84: fix: dates will be strings in Lisp |
Date: |
Tue, 3 May 2022 09:58:07 -0400 (EDT) |
branch: externals/tomelr
commit 28642f2e787a5424ebff30bbb6f7df2af54d6329
Author: Kaushal Modi <kaushal.modi@gmail.com>
Commit: Kaushal Modi <kaushal.modi@gmail.com>
fix: dates will be strings in Lisp
refactor: Move "lists of lists" to a different section
---
README.org | 94 ++++++++++++++++++++++++++++++++++++++------------------------
1 file changed, 58 insertions(+), 36 deletions(-)
diff --git a/README.org b/README.org
index 0d290b5e0f..349d2ca75a 100644
--- a/README.org
+++ b/README.org
@@ -40,7 +40,7 @@ https://toml.io/en/v1.0.0#integer
#+end_src
**** TOML
#+begin_src toml
-int1 = +99
+int1 = 99
int2 = 42
int3 = 0
int4 = -17
@@ -73,7 +73,7 @@ https://toml.io/en/v1.0.0#float
**** TOML
#+begin_src toml
# fractional
-flt1 = +1.0
+flt1 = 1.0
flt2 = 3.1415
flt3 = -0.01
@@ -128,9 +128,9 @@ bool2 = false
https://toml.io/en/v1.0.0#offset-date-time
**** S-expression
#+begin_src emacs-lisp :eval no :noweb-ref scalar-odt
-'((odt1 . 1979-05-27T07:32:00Z)
- (odt2 . 1979-05-27T00:32:00-07:00)
- (odt3 . 1979-05-27T00:32:00.999999-07:00))
+'((odt1 . "1979-05-27T07:32:00Z")
+ (odt2 . "1979-05-27T00:32:00-07:00")
+ (odt3 . "1979-05-27T00:32:00.999999-07:00"))
#+end_src
**** TOML
#+begin_src toml
@@ -154,7 +154,7 @@ odt3 = 1979-05-27T00:32:00.999999-07:00
https://toml.io/en/v1.0.0#local-date
**** S-expression
#+begin_src emacs-lisp :eval no :noweb-ref scalar-date
-'((ld1 . 1979-05-27))
+'((ld1 . "1979-05-27"))
#+end_src
**** TOML
#+begin_src toml
@@ -172,36 +172,26 @@ ld1 = 1979-05-27
: }
** TOML Arrays: Lists
https://toml.io/en/v1.0.0#array
-*** S-expression
+*** Lists
+**** S-expression
#+begin_src emacs-lisp :eval no :noweb-ref lists
'((integers . (1 2 3))
(integers2 . [1 2 3]) ;Same as above
(colors . ("red" "yellow" "green"))
- (nested_arrays_of_ints . [(1 2) (3 4 5)])
- (nested_mixed_array . [(1 2) ("a" "b" "c")])
(string_array . ("all" "strings" "are the same" "type"))
- (numbers . (0.1 0.2 0.5 1 2 5))
- (contributors . ("Foo Bar <foo@example.com>"
- ((name . "Baz Qux")
- (email . "bazqux@example.com")
- (url . "https://example.com/bazqux")))))
+ (numbers . (0.1 0.2 0.5 1 2 5)))
#+end_src
-*** TOML
+**** TOML
#+begin_src toml
integers = [ 1, 2, 3 ]
+integers2 = [ 1, 2, 3 ]
colors = [ "red", "yellow", "green" ]
-nested_arrays_of_ints = [ [ 1, 2 ], [3, 4, 5] ]
-nested_mixed_array = [ [ 1, 2 ], ["a", "b", "c"] ]
string_array = [ "all", 'strings', """are the same""", '''type''' ]
# Mixed-type arrays are allowed
numbers = [ 0.1, 0.2, 0.5, 1, 2, 5 ]
-contributors = [
- "Foo Bar <foo@example.com>",
- { name = "Baz Qux", email = "bazqux@example.com", url =
"https://example.com/bazqux" }
-]
#+end_src
-*** JSON Reference
+**** JSON Reference
#+begin_src emacs-lisp :noweb yes :exports results
(json-encode-pretty
<<lists>>)
@@ -225,6 +215,52 @@ contributors = [
"yellow",
"green"
],
+ "string_array": [
+ "all",
+ "strings",
+ "are the same",
+ "type"
+ ],
+ "numbers": [
+ 0.1,
+ 0.2,
+ 0.5,
+ 1,
+ 2,
+ 5
+ ]
+}
+#+end_example
+*** Lists of lists
+**** S-expression
+#+begin_src emacs-lisp :eval no :noweb-ref lists-of-lists
+'((nested_arrays_of_ints . [(1 2) (3 4 5)])
+ (nested_mixed_array . [(1 2) ("a" "b" "c")])
+ (contributors . ("Foo Bar <foo@example.com>"
+ ((name . "Baz Qux")
+ (email . "bazqux@example.com")
+ (url . "https://example.com/bazqux")))))
+#+end_src
+**** TOML
+#+begin_src toml
+nested_arrays_of_ints = [ [ 1, 2 ], [3, 4, 5] ]
+nested_mixed_array = [ [ 1, 2 ], ["a", "b", "c"] ]
+
+# Mixed-type arrays are allowed
+contributors = [
+ "Foo Bar <foo@example.com>",
+ { name = "Baz Qux", email = "bazqux@example.com", url =
"https://example.com/bazqux" }
+]
+#+end_src
+**** JSON Reference
+#+begin_src emacs-lisp :noweb yes :exports results
+(json-encode-pretty
+ <<lists-of-lists>>)
+#+end_src
+
+#+RESULTS:
+#+begin_example
+{
"nested_arrays_of_ints": [
[
1,
@@ -247,20 +283,6 @@ contributors = [
"c"
]
],
- "string_array": [
- "all",
- "strings",
- "are the same",
- "type"
- ],
- "numbers": [
- 0.1,
- 0.2,
- 0.5,
- 1,
- 2,
- 5
- ],
"contributors": [
"Foo Bar <foo@example.com>",
{
- [elpa] branch externals/tomelr created (now a1fa47379e), ELPA Syncer, 2022/05/03
- [elpa] externals/tomelr 732140041e 07/84: doc: Discover `json-encoding-pretty-print` variable!, ELPA Syncer, 2022/05/03
- [elpa] externals/tomelr d96a3b235b 04/84: doc: Add LOGBOOK drawer example, ELPA Syncer, 2022/05/03
- [elpa] externals/tomelr 05d2cafcd9 09/84: test: Add test for boolean scalar key-value pairs, ELPA Syncer, 2022/05/03
- [elpa] externals/tomelr 2ea3b5e032 03/84: fix!: Set boolean false using :false value, ELPA Syncer, 2022/05/03
- [elpa] externals/tomelr 28642f2e78 05/84: fix: dates will be strings in Lisp,
ELPA Syncer <=
- [elpa] externals/tomelr 52dc93201d 08/84: feat: First cut -- Port json-encode from json.el to tomelr-encode, ELPA Syncer, 2022/05/03
- [elpa] externals/tomelr 7cd15e79b8 10/84: tool(ci): Add GHA setup, ELPA Syncer, 2022/05/03
- [elpa] externals/tomelr c872e9efc1 17/84: test: Add test for integer scalar key-value pairs, ELPA Syncer, 2022/05/03
- [elpa] externals/tomelr a1f434f03a 31/84: feat: Support nested TOML tables, ELPA Syncer, 2022/05/03
- [elpa] externals/tomelr 6bbe740e52 28/84: test: Test that 'false is also considered as boolean false in TOML, ELPA Syncer, 2022/05/03
- [elpa] externals/tomelr 9c91e0dc07 18/84: test: Add test for float scalar key-value pairs, ELPA Syncer, 2022/05/03
- [elpa] externals/tomelr 96c890a68b 23/84: feat: Convert Lisp lists to TOML arrays, ELPA Syncer, 2022/05/03
- [elpa] externals/tomelr bb85106ee9 27/84: doc: Add spec for nested tables and arrays of tables, ELPA Syncer, 2022/05/03
- [elpa] externals/tomelr 1d65064ffa 20/84: feat: Recognize local date format YYYY-MM-DD, ELPA Syncer, 2022/05/03
- [elpa] externals/tomelr 2810504e84 32/84: feat: Add basic support for S-exp plists -> TOML conversion, ELPA Syncer, 2022/05/03