Skip to content

Render JSON, JSONL, and YAML files with pretty/expandable view #8

Description

@nonatofabio

Summary

Extend Mindle beyond Markdown to render JSON, JSONL, and YAML files in a clean, readable way. These formats sit right next to .md files in the kind of project folders Mindle is built for (specs, configs, logs, AI-tool outputs), and there's no dedicated macOS reader for them either.

Proposed behavior

.json

  • Pretty-printed with consistent indentation (2 or 4 spaces, ideally configurable)
  • Syntax highlighting (keys, strings, numbers, booleans, null)
  • Collapsible objects and arrays (click to fold/unfold subtrees)

.jsonl / .ndjson

  • Each line shown as a single collapsed entry by default — compact list view
  • Click a line to expand it into the full pretty-printed JSON view (same renderer as .json)
  • "Expand all" / "Collapse all" affordance
  • Useful for large logs and AI streaming-output captures

.yaml / .yml

  • Pretty rendering with syntax highlighting
  • Collapsible mappings and sequences (same fold behavior as JSON)
  • Multi-document YAML streams (separated by ---) treated like JSONL: each document is a collapsible entry, expandable into the full view

Why this fits Mindle

Mindle's reader positioning is strongest for the "AI writes, you read" workflow — and that workflow doesn't stop at Markdown. AI coding tools and pipelines generate JSON specs, JSONL logs, and YAML configs in the same project folders. A user opening Mindle to read a CLAUDE.md will likely also want to peek at the claude.jsonl log or the config.yaml next to it without launching VSCode.

Implementation notes (optional)

  • Detect by file extension first; fall back to content sniffing for files without an extension
  • Reuse the existing reader chrome (tabs, themes, Quick Look) — only the body renderer changes per format
  • Errors (malformed JSON/YAML) shown inline with line/column, not as a modal — keep it a reader, not an editor

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions