[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/tomelr 846676a172 06/84: feat: Add plist example
From: |
ELPA Syncer |
Subject: |
[elpa] externals/tomelr 846676a172 06/84: feat: Add plist example |
Date: |
Tue, 3 May 2022 09:58:07 -0400 (EDT) |
branch: externals/tomelr
commit 846676a172d2bdd39e1e8b5628a7e88a3605f68b
Author: Kaushal Modi <kaushal.modi@gmail.com>
Commit: Kaushal Modi <kaushal.modi@gmail.com>
feat: Add plist example
---
README.org | 100 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 100 insertions(+)
diff --git a/README.org b/README.org
index 349d2ca75a..6c0e0711e8 100644
--- a/README.org
+++ b/README.org
@@ -786,6 +786,106 @@ key5 = true
: "key4": false,
: "key5": true
: }
+** P-lists
+**** S-expression
+#+begin_src emacs-lisp :eval no :noweb-ref p-list
+'(:int 123
+ :remove_this_key nil
+ :str "abc"
+ :bool_false :false
+ :bool_true t
+ :int_list (1 2 3)
+ :str_list ("a" "b" "c")
+ :bool_list (t :false t :false)
+ :list_of_lists [(1 2) (3 4 5)]
+ :map (:key1 123
+ :key2 "xyz")
+ :list_of_maps [(:key1 123
+ :key2 "xyz")
+ (:key1 567
+ :key2 "klm")])
+#+end_src
+**** TOML
+#+begin_src toml
+int = 123.0
+str = "abc"
+bool_false = false
+bool_true = true
+int_list = [1.0, 2.0, 3.0]
+str_list = ["a", "b", "c"]
+bool_list = [true, false, true, false]
+list_of_lists = [ [1.0, 2.0],
+ [3.0, 4.0, 5.0] ]
+
+[map]
+ key1 = 123.0
+ key2 = "xyz"
+
+[[list_of_maps]]
+ key1 = 123.0
+ key2 = "xyz"
+[[list_of_maps]]
+ key1 = 567.0
+ key2 = "klm"
+#+end_src
+**** JSON Reference
+#+begin_src emacs-lisp :noweb yes :exports results
+(json-encode-pretty
+ <<p-list>>)
+#+end_src
+
+#+RESULTS:
+#+begin_example
+{
+ "int": 123,
+ "remove_this_key": null,
+ "str": "abc",
+ "bool_false": false,
+ "bool_true": true,
+ "int_list": [
+ 1,
+ 2,
+ 3
+ ],
+ "str_list": [
+ "a",
+ "b",
+ "c"
+ ],
+ "bool_list": [
+ true,
+ false,
+ true,
+ false
+ ],
+ "list_of_lists": [
+ [
+ 1,
+ 2
+ ],
+ [
+ 3,
+ 4,
+ 5
+ ]
+ ],
+ "map": {
+ "key1": 123,
+ "key2": "xyz"
+ },
+ "list_of_maps": [
+ {
+ "key1": 123,
+ "key2": "xyz"
+ },
+ {
+ "key1": 567,
+ "key2": "klm"
+ }
+ ]
+}
+#+end_example
+
* COMMENT Development
** Running Tests
*** Run all tests
- [elpa] externals/tomelr 4434ccc64b 70/84: chore: Bump version, (continued)
- [elpa] externals/tomelr 4434ccc64b 70/84: chore: Bump version, ELPA Syncer, 2022/05/03
- [elpa] externals/tomelr 10a1994aed 51/84: feat: Support (lightly tested) nested TOML Table Arrays, ELPA Syncer, 2022/05/03
- [elpa] externals/tomelr df0e73334f 59/84: Revert "doc: Update the medley example", ELPA Syncer, 2022/05/03
- [elpa] externals/tomelr ec381fd723 79/84: fix: Auto-stringify and auto-quote symbol values, ELPA Syncer, 2022/05/03
- [elpa] externals/tomelr a25d952a17 77/84: feat: Auto-coerce string to integers, ELPA Syncer, 2022/05/03
- [elpa] externals/tomelr b2ba4c46b5 82/84: refactor: Minor code reorg, ELPA Syncer, 2022/05/03
- [elpa] externals/tomelr d86fd721ce 63/84: fix: Compatibility for emacs 26.3, ELPA Syncer, 2022/05/03
- [elpa] externals/tomelr a1fa47379e 84/84: chore: Add CHANGELOG generated using git cliff tool, ELPA Syncer, 2022/05/03
- [elpa] externals/tomelr ae983711be 78/84: fix: Auto-stringify symbols like 1.10.1, ELPA Syncer, 2022/05/03
- [elpa] externals/tomelr 61397410af 01/84: Initial empty commit, ELPA Syncer, 2022/05/03
- [elpa] externals/tomelr 846676a172 06/84: feat: Add plist example,
ELPA Syncer <=
- [elpa] externals/tomelr 8bc506af5a 02/84: Add s-exp->toml examples and spec, ELPA Syncer, 2022/05/03
- [elpa] externals/tomelr 7d8d41f15b 19/84: feat: Encode to multi-line TOML string automatically, ELPA Syncer, 2022/05/03
- [elpa] externals/tomelr 0ba5f2ff69 24/84: chore(readme): Move mixed type array example to the 'medley' example, ELPA Syncer, 2022/05/03
- [elpa] externals/tomelr ca9245038a 35/84: fix: Attempt to make tomelr--toml-table-p more robust, ELPA Syncer, 2022/05/03
- [elpa] externals/tomelr 000067cf7d 14/84: chore(readme): Update, ELPA Syncer, 2022/05/03
- [elpa] externals/tomelr 69217d47a6 22/84: feat: Skip converting keys whose values are nil, ELPA Syncer, 2022/05/03
- [elpa] externals/tomelr af40c0b40f 11/84: fix: Require subr-x for older Emacs versions, ELPA Syncer, 2022/05/03
- [elpa] externals/tomelr 060c38b934 16/84: chore(readme): Limit up to 3 levels of headings for Org exports, ELPA Syncer, 2022/05/03
- [elpa] externals/tomelr 20bf9e6c54 12/84: chore(doc): Add GHA and license badges, ELPA Syncer, 2022/05/03
- [elpa] externals/tomelr f37841cc78 25/84: test: Add test for TOML Array of Arrays, ELPA Syncer, 2022/05/03