• Townie
    AI
  • Blog
  • Docs
  • Pricing
  • We’re hiring!
Log inSign up
wolf

wolf

JSONRPC-Viewer

Public
Like
JSONRPC-Viewer
Home
Code
2
README.md
H
index.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 milliseconds.
Sign up now
Code
/
README.md
Code
/
README.md
Search
6/11/2025
Viewing readonly version of main branch: v6
View latest version
README.md

JSON-RPC Viewer

A web-based tool for visualizing JSON-RPC communication in a chat-like format. Perfect for debugging Language Server Protocol (LSP) communications, API calls, and other JSON-RPC based protocols.

Features

  • Parse JSON-RPC Messages: Automatically extracts JSON-RPC messages from raw text input
  • Content-Length Header Support: Handles messages with or without Content-Length headers
  • Chat-like Visualization: Displays messages in a conversation format with client/server distinction
  • Message Type Detection: Automatically identifies requests, responses, and notifications
  • Collapsible Content: Each message can be collapsed/expanded for better readability
  • Syntax Highlighting: JSON content is properly formatted and displayed
  • Bulk Operations: Collapse or expand all messages at once

How to Use

  1. Paste Your Data: Copy and paste your JSON-RPC communication log into the text area
  2. Parse Messages: Click "Parse Messages" to extract and display the JSON-RPC messages
  3. View Results: Messages are displayed in chronological order with:
    • Blue boxes for client-to-server messages (→ Client)
    • Green boxes for server-to-client messages (← Server)
    • Message type badges (REQUEST, RESPONSE, NOTIFICATION)
    • Method names and IDs when available

Supported Input Formats

The tool can handle various input formats:

With Content-Length Headers

Content-Length: 123

{"jsonrpc":"2.0","id":1,"method":"initialize","params":{...}}
Content-Length: 456

{"jsonrpc":"2.0","id":1,"result":{...}}

Raw JSON Lines

{"jsonrpc":"2.0","id":1,"method":"initialize","params":{...}}
{"jsonrpc":"2.0","id":1,"result":{...}}

Mixed Format

The parser is flexible and can handle mixed formats with varying whitespace and line breaks.

Message Direction Detection

The tool uses intelligent heuristics to determine message direction:

  • Requests: Generally client-to-server
  • Responses: Always server-to-client (based on presence of result or error)
  • Notifications: Direction determined by method name patterns
    • textDocument/*, workspace/* → client-to-server
    • Others → server-to-client

Controls

  • Parse Messages: Process the input and display results
  • Clear: Clear both input and output
  • Collapse All: Minimize all message content for overview
  • Expand All: Show full content of all messages

Use Cases

  • LSP Debugging: Visualize Language Server Protocol communications
  • API Development: Debug JSON-RPC API calls
  • Protocol Analysis: Understand message flow in JSON-RPC systems
  • Documentation: Create visual representations of API interactions

Technical Details

  • Built with vanilla JavaScript and TailwindCSS
  • Client-side parsing (no data sent to servers)
  • Responsive design for various screen sizes
  • Handles malformed JSON gracefully with error reporting
FeaturesVersion controlCode intelligenceCLI
Use cases
TeamsAI agentsSlackGTM
DocsShowcaseTemplatesNewestTrendingAPI examplesNPM packages
PricingNewsletterBlogAboutCareers
We’re hiring!
Brandhi@val.townStatus
X (Twitter)
Discord community
GitHub discussions
YouTube channel
Bluesky
Open Source Pledge
Terms of usePrivacy policyAbuse contact
© 2025 Val Town, Inc.