2 Commits

Author SHA1 Message Date
2129157f8d
feat(jsontypes): add jsonsample CLI and sample format support
jsonsample emits the same flat path format as jsonrawpaths but with
actual JSON values at leaf nodes and compact JSON samples at type intro
lines (e.g., {Root:{"name":"pikachu","id":25,...}}). Output is auto-
coalesced: types deduplicated by key set, one sample per primitive type.

Updated coalescer to handle TypeName:Sample format in type intros,
using first { instead of last { for parsing (handles nested JSON braces).
Sample output is valid input for jsoncoalesce (idempotent round-trip).
2026-06-11 16:14:38 -06:00
6d43b07f3f
feat(jsontypes): add two-pass coalescer for raw path output
Coalesce merges streamer output by deduplicating types with identical
key sets, collapsing {null} into nullable annotations ({string?}),
cleaning up type names (removing unnecessary numbers, deriving names
from keys when many types share a shape), and eliding duplicate type
definitions. Preserves {undefined} distinct from {null} per the
three-stage pipeline design.

Pokemon fixture: 241 raw lines → 140 coalesced lines.
2026-06-11 16:14:38 -06:00