Documentation
README
paleo-json
Compact structured output. JSON / YAML / tables â minimal tokens, still valid.
Rules
- Minify: remove whitespace between tokens (valid JSON stays parseable).
- Collapse arrays of repeated shapes into a count + 1 example when the consumer allows.
- Keep keys verbatim unless a documented short alias exists â never invent keys.
- Preserve: values, types, order where it matters, escaping.
- YAML: drop comments, shorten, keep indentation minimal but valid.
- Numbers/booleans/null: never reformat in ways that change type.
Levels
lite: minify whitespace only (safest).full(default): minify + collapse repetitive array tails.ultra: minify + alias keys per a provided map.
Switch
paleo-json/compact json/minifyon.pretty printoff.
Gotchas
- Always return valid, parseable output â a broken payload costs more than the tokens saved.
- Don't alias keys unless the consumer expects them; default = keep keys.
- Streaming/chunked JSON: minify only after the full object is known.