文档

json-report

试用

Convert JSON data into clean Markdown tables and reports. Use for pasted JSON, API or log output, or any batch of JSON records.

它能做什么

Convert JSON data into clean Markdown tables and reports. Use for pasted JSON, API or log output, or any batch of JSON records.

技能文档

When to Use

Use when the main artifact is a readable Markdown report derived from JSON data, for example:

  • The user pastes JSON and asks for a table, summary, or readable report.
  • API responses, logs, or exports need to be turned into documentation.
  • A batch of JSON records should become a single .md document.

Core Rules

1. Prefer the helper script over hand-built tables

  • Run {baseDir}/scripts/json_to_md.py with the exec tool instead of writing tables by hand.
  • The script handles escaping, column detection, and multi-table inputs.
  • Fall back to manual conversion only when Python is unavailable or the input needs special handling the script does not cover.

2. Preserve data fidelity

  • Never round or truncate numbers, dates, or strings when converting.
  • Escape | characters in cell content so tables do not break.
  • Keep field names exactly as they appear in the source JSON.

3. Choose the right output shape

  • A top-level array of flat objects becomes one Markdown table.
  • A top-level object whose values are arrays becomes one table per key.
  • A single object becomes a two-column key/value table.

Usage

python {baseDir}/scripts/json_to_md.py input.json --title "My Report" --out report.md

Common Traps

  • Multi-line cell values silently break table rows; the script converts newlines to ``.
  • JSON with mixed record shapes can produce sparse tables; confirm the columns before delivery.
  • Large inputs may produce very wide tables; prefer key/value layout for deeply nested objects.

Output Format

Output is Markdown: an optional # Title heading followed by one or more GitHub-style tables. Always deliver the result as a .md file or markdown text block.

相关技能

Render compact generic data tables to PNG images with json-render-cli. Use when users ask to visualize arbitrary structured rows/columns (non-ticket-specific...

49 次安装

Transform JSON or CSV data into stunning interactive HTML dashboards with auto-detected charts, KPI cards, and dark glass-morphism design. Generates complete standalone HTML with Chart.js.

1 次安装

Format and validate JSON files with pretty-printing, indentation control, key sorting, and validation modes supporting stdin, stdout, and file I/O.

16 次安装

按字节、语法、类型映射、契约、尺寸五层定位并修复 JSON 问题。

作者 Iván112 次安装3 星标

Generate a Table of Contents (TOC) from Markdown headings. Supports heading extraction, multiple output formats, and configurable level filtering.

作者 haidong14 次安装

Web Data Convertor: Convert between web formats: JSON↔CSV, JSON↔XML, JSON↔YAML, Markdown↔HTML, query strings, Unix timestamps↔dates with timezone support. Us...

1 次安装