Human vs. JSON output formatting: avoid mixing concerns
blog.liw.fi
blog.liw.fi
If you create JSON interfaces, scaffold them declaratively, then modify them with destructuring, you can output the values at any time (like for print debugging) in their native form.
LLMs are good at JSON, too, and you can ask them to keep their internal data in JSON while working on a problem, making it easy to save to a file or use elsewhere.