Skip to content

Commit a9877c7

Browse files
committed
.
1 parent 2c7cad5 commit a9877c7

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -219,22 +219,22 @@ Show help:
219219

220220
Note: flags align with head/tail conventions (`-c/--bytes`, `-C/--global-bytes`).
221221

222-
## Examples: head vs hson
222+
## What’s wrong with just using head/tail?
223223

224224
Input:
225225

226226
```json
227227
{"users":[{"id":1,"name":"Ana","roles":["admin","dev"]},{"id":2,"name":"Bo"}],"meta":{"count":2,"source":"db"}}
228228
```
229229

230-
Naive cut (can break mid‑token):
230+
If you `head -c` a JSON file/stream, you can cut it in the middle of a value and end up with a confusing snippet:
231231

232232
```bash
233233
jq -c . users.json | head -c 80
234234
# {"users":[{"id":1,"name":"Ana","roles":["admin","dev"]},{"id":2,"name":"Bo"}],"me
235235
```
236236

237-
Structured preview with hson (JSON family, default style → Pseudo):
237+
With `hson`, you still get a compact preview, but it stays structure-aware:
238238

239239
```bash
240240
hson -c 120 -f json -t default users.json
@@ -247,7 +247,7 @@ hson -c 120 -f json -t default users.json
247247
# }
248248
```
249249

250-
Machine‑readable preview (JSON family, strict style → strict JSON):
250+
If you need machine-readable output, use strict mode:
251251

252252
```bash
253253
hson -c 120 -f json -t strict users.json

0 commit comments

Comments
 (0)