Skip to content

Commit bfdfbd8

Browse files
docs: overhaul example
1 parent 1a652d2 commit bfdfbd8

File tree

1 file changed

+72
-14
lines changed

1 file changed

+72
-14
lines changed

README.md

Lines changed: 72 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -41,31 +41,89 @@ AI is becoming cheaper and more accessible, but larger context windows allow for
4141

4242
```json
4343
{
44-
"users": [
45-
{ "id": 1, "name": "Alice", "role": "admin" },
46-
{ "id": 2, "name": "Bob", "role": "user" }
44+
"context": {
45+
"task": "Our favorite hikes together",
46+
"homeBase": "Boulder",
47+
"season": "spring_2025"
48+
},
49+
"friends": ["ana", "luis", "sam"],
50+
"hikes": [
51+
{
52+
"id": 1,
53+
"name": "Blue Lake Trail",
54+
"distanceKm": 7.5,
55+
"elevationGain": 320,
56+
"companion": "ana",
57+
"wasSunny": true
58+
},
59+
{
60+
"id": 2,
61+
"name": "Ridge Overlook",
62+
"distanceKm": 9.2,
63+
"elevationGain": 540,
64+
"companion": "luis",
65+
"wasSunny": false
66+
},
67+
{
68+
"id": 3,
69+
"name": "Wildflower Loop",
70+
"distanceKm": 5.1,
71+
"elevationGain": 180,
72+
"companion": "sam",
73+
"wasSunny": true
74+
}
4775
]
4876
}
4977
```
5078

51-
YAML conveys the same infromation with **fewer tokens**:
79+
YAML conveys the same information with **fewer tokens**:
5280

5381
```yaml
54-
users:
82+
context:
83+
task: Our favorite hikes together
84+
homeBase: Boulder
85+
season: spring_2025
86+
87+
friends:
88+
- ana
89+
- luis
90+
- sam
91+
92+
hikes:
5593
- id: 1
56-
name: Alice
57-
role: admin
94+
name: Blue Lake Trail
95+
distanceKm: 7.5
96+
elevationGain: 320
97+
companion: ana
98+
wasSunny: true
5899
- id: 2
59-
name: Bob
60-
role: user
100+
name: Ridge Overlook
101+
distanceKm: 9.2
102+
elevationGain: 540
103+
companion: luis
104+
wasSunny: false
105+
- id: 3
106+
name: Wildflower Loop
107+
distanceKm: 5.1
108+
elevationGain: 180
109+
companion: sam
110+
wasSunny: true
61111
```
62112
63-
TOON conveys the same information with **even fewer tokens**:
113+
TOON conveys the same information with **even fewer tokens**, while keeping the hikes in a clear tabular layout:
64114
65-
```
66-
users[2]{id,name,role}:
67-
1,Alice,admin
68-
2,Bob,user
115+
```toon
116+
context:
117+
task: Our favorite hikes together
118+
homeBase: Boulder
119+
season: spring_2025
120+
121+
friends[3]: ana,luis,sam
122+
123+
hikes[3]{id,name,distanceKm,elevationGain,companion,wasSunny}:
124+
1,Blue Lake Trail,7.5,320,ana,true
125+
2,Ridge Overlook,9.2,540,luis,false
126+
3,Wildflower Loop,5.1,180,sam,true
69127
```
70128
71129
## Key Features

0 commit comments

Comments
 (0)