# fmt Demos
## Basic JSONL Formatting
Formats JSONL content with visual grid expansion and sorted keys.
<div class="demo-source">
```jsonl
{"type": "palette", "name": "colors", "colors": {"{_}": "#00000000", "{r}": "#FF0000", "{g}": "#00FF00", "{b}": "#0000FF"}}
{"type": "sprite", "name": "rgb_square", "palette": "colors", "grid": ["{r}{g}", "{b}{r}"]}
{"type": "sprite", "name": "larger_sprite", "palette": "colors", "grid": ["{_}{r}{r}{_}", "{r}{g}{g}{r}", "{r}{g}{g}{r}", "{_}{b}{b}{_}"]}
```
</div>
<div class="demo-container" data-demo="basic">
</div>
## Visual Grid Expansion
Multi-row sprite grids are expanded to one row per line for visual clarity.
<div class="demo-source">
```jsonl
{"type": "palette", "name": "colors", "colors": {"{_}": "#00000000", "{r}": "#FF0000", "{g}": "#00FF00", "{b}": "#0000FF"}}
{"type": "sprite", "name": "rgb_square", "palette": "colors", "grid": ["{r}{g}", "{b}{r}"]}
{"type": "sprite", "name": "larger_sprite", "palette": "colors", "grid": ["{_}{r}{r}{_}", "{r}{g}{g}{r}", "{r}{g}{g}{r}", "{_}{b}{b}{_}"]}
```
</div>
<div class="demo-container" data-demo="visual_grid">
</div>
## Format Roundtrip
Formatted content parses identically to original.
<div class="demo-source">
```jsonl
{"type": "palette", "name": "colors", "colors": {"{_}": "#00000000", "{r}": "#FF0000", "{g}": "#00FF00", "{b}": "#0000FF"}}
{"type": "sprite", "name": "rgb_square", "palette": "colors", "grid": ["{r}{g}", "{b}{r}"]}
{"type": "sprite", "name": "larger_sprite", "palette": "colors", "grid": ["{_}{r}{r}{_}", "{r}{g}{g}{r}", "{r}{g}{g}{r}", "{_}{b}{b}{_}"]}
```
</div>
<div class="demo-container" data-demo="roundtrip">
</div>