Public
Like
JSONRPC-Viewer
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.
Viewing readonly version of main branch: v6View latest version
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.
- 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
- Paste Your Data: Copy and paste your JSON-RPC communication log into the text area
- Parse Messages: Click "Parse Messages" to extract and display the JSON-RPC messages
- 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
The tool can handle various input formats:
Content-Length: 123
{"jsonrpc":"2.0","id":1,"method":"initialize","params":{...}}
Content-Length: 456
{"jsonrpc":"2.0","id":1,"result":{...}}
{"jsonrpc":"2.0","id":1,"method":"initialize","params":{...}}
{"jsonrpc":"2.0","id":1,"result":{...}}
The parser is flexible and can handle mixed formats with varying whitespace and line breaks.
The tool uses intelligent heuristics to determine message direction:
- Requests: Generally client-to-server
- Responses: Always server-to-client (based on presence of
resultorerror) - Notifications: Direction determined by method name patterns
textDocument/*,workspace/*→ client-to-server- Others → server-to-client
- 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
- 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
- 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