Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 11 additions & 9 deletions examples/conversions/api-response.toon
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
data.id: 42
data.type: user
data.attributes.name: Ada Lovelace
data.attributes.email: ada@example.com
data.attributes.active: true
meta.request.id: req_abc123
meta.request.timestamp: "2025-01-15T10:30:00Z"
meta.response.duration: 42
meta.response.cached: false
data:
id: 42
type: user
attributes.name: Ada Lovelace
attributes.email: ada@example.com
attributes.active: true
meta:
request.id: req_abc123
request.timestamp: "2025-01-15T10:30:00Z"
response.duration: 42
response.cached: false
13 changes: 7 additions & 6 deletions examples/conversions/config.toon
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
server.host: localhost
server.port: 8080
server.timeout: 30000
database.connection.host: db.example.com
database.connection.port: 5432
database.connection.username: admin
database.connection.database: myapp_prod
database.pool.min: 2
database.pool.max: 10
database:
connection.host: db.example.com
connection.port: 5432
connection.username: admin
connection.database: myapp_prod
pool.min: 2
pool.max: 10
logging.level: info
logging.format: json
7 changes: 4 additions & 3 deletions examples/valid/key-folding-basic.toon
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
server.host: localhost
server.port: 8080
database.connection.host: db.example.com
database.connection.port: 5432
database.connection.username: admin
database.connection:
host: db.example.com
port: 5432
username: admin
app.name: MyApp
app.version: 1.0.0
3 changes: 2 additions & 1 deletion examples/valid/key-folding-mixed.toon
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,5 @@ server:
ssl:
enabled: true
cert: /path/to/cert.pem
database.connection.url: "postgresql://localhost:5432/mydb"
database.connection:
url: "postgresql://localhost:5432/mydb"
5 changes: 3 additions & 2 deletions examples/valid/key-folding-with-array.toon
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
api.endpoint: "https://api.example.com"
api.timeout: 5000
data.meta.items[3]: widget,gadget,tool
data.meta.count: 3
data.meta:
items[3]: widget,gadget,tool
count: 3
user.preferences.tags[2]: productivity,development
11 changes: 7 additions & 4 deletions examples/valid/path-expansion-merge.toon
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
user.profile.name: Ada Lovelace
user.profile.email: ada@example.com
user.settings.theme: dark
user.settings.notifications: true
user:
profile:
name: Ada Lovelace
email: ada@example.com
settings:
theme: dark
notifications: true
system.version: 1.5.0