FeaturesTemplatesShowcaseTownie
AI
BlogDocsPricing
Log inSign up
wolf
wolfJSONRPC-Viewer
Public
Like
JSONRPC-Viewer
Home
Code
4
frontend
4
shared
6
README.md
H
main.ts
Branches
2
Pull requests
Remixes
History
Environment variables
Val Town is a collaborative website to build and scale JavaScript apps.
Deploy APIs, crons, & store data – all from the browser, and deployed in miliseconds.
Sign up now
Code
/
Code
/
Search
main.ts
https://wolf--006ad326471c11f0909276b3cceeab13.web.val.run
README.md

JSON-RPC Viewer

A web-based tool for parsing and visualizing JSON Lines containing JSON-RPC messages. Perfect for analyzing Language Server Protocol (LSP) logs, debugging API communications, and understanding request-response flows.

🚀 How to Use

1. Input Your Data

Paste your JSON-RPC communication logs into the textarea. The tool accepts:

  • Raw JSON Lines (one JSON object per line)
  • Messages with Content-Length headers (LSP format)
  • Mixed formats with varying whitespace

2. Parse & Visualize

Click "Parse Messages" to extract and display the JSON-RPC messages with:

  • Request-Response Grouping: Related messages are paired together
  • Direction Indicators: Client → Server vs Server → Client
  • Message Types: REQUEST, RESPONSE, NOTIFICATION
  • Method Names & IDs: Clearly labeled for easy identification

3. Control Your View

Use the toolbar buttons to customize the display:

  • Toggle Grouping: Switch between grouped pairs and chronological order
  • Hide Ping: Filter out noisy ping/keepalive messages
  • Collapse/Expand All: Minimize or maximize all message content
  • Individual Controls: Collapse/expand specific messages or pairs

📋 Example Input Format

Content-Length: 87

{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"capabilities":{}}}
Content-Length: 45

{"jsonrpc":"2.0","id":1,"result":{"capabilities":{}}}
Content-Length: 52

{"jsonrpc":"2.0","method":"initialized","params":{}}

✨ Key Features

  • Smart Grouping: Automatically pairs requests with their responses
  • Ping Filtering: Hide noisy keepalive messages with one click
  • Visual Distinction: Color-coded messages with clear direction indicators
  • Flexible Views: Toggle between grouped and chronological display
  • Newest First: Messages displayed in reverse chronological order
  • Responsive Design: Works on desktop and mobile devices
  • Privacy-First: All parsing happens client-side, no data sent to servers

🏗️ Architecture

The application is organized into a clean, modular structure:

├── main.ts              # Hono backend entry point
├── frontend/            # Client-side application
│   ├── index.html       # Main HTML template
│   ├── style.css        # Custom styles
│   ├── app.js          # Application initialization
│   └── README.md
├── shared/              # Shared components
│   ├── JsonRpcViewer.js # Main application orchestrator
│   ├── MessageParser.js # JSON parsing logic
│   ├── MessageGrouper.js# Message organization & filtering
│   ├── MessageRenderer.js# DOM creation & visualization
│   ├── utils.js         # Shared utilities
│   └── README.md
└── README.md

Component Responsibilities

  • Backend (Hono): Static file serving and API endpoints
  • Frontend: User interface and interaction handling
  • Shared: Core business logic that works in both environments

🎯 Perfect For

  • LSP Analysis: Debug Language Server Protocol communications
  • API Development: Visualize JSON-RPC API request/response flows
  • Protocol Debugging: Understand complex message sequences
  • Documentation: Create visual representations of API interactions
  • Learning: Study how JSON-RPC protocols work in practice

🔧 Technical Notes

  • Built with Hono backend and vanilla JavaScript frontend
  • ES6 modules with no build step required
  • TailwindCSS for responsive styling
  • Handles malformed JSON gracefully with error reporting
  • Supports large message logs with efficient parsing
  • No external dependencies or data transmission
HTTP
  • main.ts
    wolf--00…13.web.val.run
Code
frontendsharedREADME.md
H
main.ts
Go to top
X (Twitter)
Discord community
GitHub discussions
YouTube channel
Bluesky
Product
FeaturesPricing
Developers
DocsStatusAPI ExamplesNPM Package Examples
Explore
ShowcaseTemplatesNewest ValsTrending ValsNewsletter
Company
AboutBlogCareersBrandhi@val.town
Terms of usePrivacy policyAbuse contact
© 2025 Val Town, Inc.