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: v47View latest version
Shared utilities and components used by both frontend and backend.
- JsonRpcViewer.js- Main application class that orchestrates all functionality
- MessageParser.js- Handles parsing of JSON Lines and Content-Length formatted input
- MessageGrouper.js- Groups messages into request-response pairs and handles filtering
- MessageRenderer.js- Creates DOM elements and handles visual representation
- utils.js- Shared utility functions and constants
The shared components follow a modular design:
- Parser - Extracts JSON-RPC messages from raw input
- Grouper - Organizes messages and applies filters
- Renderer - Creates visual elements
- Viewer - Orchestrates all components and handles user interactions
This separation allows for easy testing, maintenance, and potential reuse in other contexts.