Home

cfg @main - refs - log -
-
https://git.jolheiser.com/cfg.git
Convert between various configuration formats
tree log patch
docs: add nested object to examples Signed-off-by: jolheiser <john.olheiser@gmail.com>
Signature
-----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEgqEQpE3xoo1QwJO/uFOtpdp7v3oFAmZmWzIACgkQuFOtpdp7 v3r+Iw//V0AdnvNPkXVSwAAN6oFCqfuK2Vp/xQPxMrv9A9ATHBtwHD5GU3NYjMif SwwL2Y/MWjFFw3uZ5rQ6584mcF7NwZSf6dBmR+apxknFpII6lFuXcRFkz/58e2rG +TC3oY+ygs1jFmWCK4YkKCVxXCaunInuuo+9HIiVDvwaqO2i/dN4C77CRAAK6hcB cMjscMEvt+/0kHeR3C27WYNbpEcAnskm/vxcX18Z991Fur1ij/JgqSghsMAcyr1N 8Tn57XP4MNWEHNHZcnFksB7v9/mGfTFeGmky9/qjP1MmQaXgQAT13/OUZdJ8p1hX WyjEWq1gg4jSfM9lrNWVC8AaYR0oO+0XP/RSSmMkB8NYqopDGIOdoDa+CzI+p0iQ iHDUMxwlpxNheMiHetuiOKxnWhD48hRsTOs5ENOvdZy/+P6H2w+AdOyfj5jPxdkf b3MuyeDzRxaG94T6j9Ip3gFaLC26z0rel/iPj1XWeAyi3+mhSnABE7Bci/0r/PT+ R+yfBFxtSiQ2vtc5aXsgFTTamqMIef4/vz4Arb6yAReYs8Fy590sJVY2OREott3J V1jyhU2rYNs/eq3+wQ0IygtjD0CJsUQCiIk7Hq1evjjO/AxpbaLHp1hCzlscjGdy mGPlzXbGGMcGOCVA+3lmG1OQ2djiew2WZY8dHXxYGvPd0TpCMDI= =77dv -----END PGP SIGNATURE-----
jolheiser <john.olheiser@gmail.com>
6 months ago
7 changed files, 47 additions(+), 3 deletions(-)
M example/example.dhall -> example/example.dhall
diff --git a/example/example.dhall b/example/example.dhall
index 23a57c287fe0fbdf563e179534c6451ad0dc8b28..75bcded369a5d36e33b127ec2298b43077a1de39 100644
--- a/example/example.dhall
+++ b/example/example.dhall
@@ -4,4 +4,11 @@ in  { username = name
     , home = "/home/${name}"
     , admins = [ name, "admin" ]
     , email = "${name}@example.com"
+    , address =
+      { street = "123"
+      , country = "USA"
+      , state = "MT"
+      , zip = "12345"
+      , phone = "123-456-7890"
+      }
     }
M example/example.json -> example/example.json
diff --git a/example/example.json b/example/example.json
index c9990b93868c67961539d63b9d62f8a52a00b7f2..0b7f33e0a6b03fda645df64780f6596f88386002 100644
--- a/example/example.json
+++ b/example/example.json
@@ -1,4 +1,11 @@
 {
+	"address": {
+		"country": "USA",
+		"phone": "123-456-7890",
+		"state": "MT",
+		"street": "123",
+		"zip": "12345"
+	},
 	"admins": [
 		"jolheiser",
 		"admin"
M example/example.jsonc -> example/example.jsonc
diff --git a/example/example.jsonc b/example/example.jsonc
index f0a8b52efbc655b8837828ba0cd3e98fcf542c74..90b502b1d00edb949178fce7bcb4584586609118 100644
--- a/example/example.jsonc
+++ b/example/example.jsonc
@@ -1,10 +1,26 @@
 {
+	// User's address
+{
 	"admins": [
+{
 		"jolheiser",
+{
 		"admin"
+{
 	],
+{
 	"email": "jolheiser@example.com",
+{
 	"home": "/home/jolheiser",
+{
 	// The user!
+{
 	"username": "jolheiser",
+	"admins": [
+		"jolheiser",
+		"admin"
+	],
+	"email": "jolheiser@example.com",
+	"home": "/home/jolheiser",
+	"username": "jolheiser" // User's name
 }
M example/example.kdl -> example/example.kdl
diff --git a/example/example.kdl b/example/example.kdl
index 361e4b3ae542c1edb23a648be8c098dbc62ef1d3..a33aa4d07ddab750ba0c7c2f7e607cd7461442dd 100644
--- a/example/example.kdl
+++ b/example/example.kdl
@@ -1,4 +1,5 @@
+home "/home/jolheiser"
 admins "jolheiser" "admin"
 email "jolheiser@example.com"
-username "jolheiser"
+address state="MT" zip="12345" phone="123-456-7890" street="123" country="USA"
-home "/home/jolheiser"
+username "jolheiser"
M example/example.nix -> example/example.nix
diff --git a/example/example.nix b/example/example.nix
index 146bb8fc44ab48909eb6685644bff2d9cbb7198d..adda7c4bd1c78108d5c7a1d77ce3e4bf093c8548 100644
--- a/example/example.nix
+++ b/example/example.nix
@@ -1 +1 @@
-{ admins = [ "jolheiser" "admin" ]; email = "jolheiser@example.com"; home = "/home/jolheiser"; username = "jolheiser"; }
+{ address = { country = "USA"; phone = "123-456-7890"; state = "MT"; street = "123"; zip = "12345"; }; admins = [ "jolheiser" "admin" ]; email = "jolheiser@example.com"; home = "/home/jolheiser"; username = "jolheiser"; }
M example/example.toml -> example/example.toml
diff --git a/example/example.toml b/example/example.toml
index 21ef578f1a0f33c869399869fd693e148583b346..ce626445bd025e36d4874259a5249a12d29b7e8b 100644
--- a/example/example.toml
+++ b/example/example.toml
@@ -2,3 +2,10 @@ admins = ['jolheiser', 'admin']
 email = 'jolheiser@example.com'
 home = '/home/jolheiser'
 username = 'jolheiser'
+
+[address]
+country = 'USA'
+phone = '123-456-7890'
+state = 'MT'
+street = '123'
+zip = '12345'
M example/example.yaml -> example/example.yaml
diff --git a/example/example.yaml b/example/example.yaml
index 582f0ed662cc52b8d7d020b23f3a3fa5b2be3d7d..86163b21b2a2a90ad5e1fd5bbdf9427c7a6d5440 100644
--- a/example/example.yaml
+++ b/example/example.yaml
@@ -1,3 +1,9 @@
+address:
+    country: USA
+    phone: 123-456-7890
+    state: MT
+    street: "123"
+    zip: "12345"
 admins:
     - jolheiser
     - admin