A lightweight frontend tool for visualizing JSON as interactive diagrams.
Demo:
- Standard JSON parsing (
JSON.parse) - Three views:
- Vertical flow
- Horizontal flow (field-anchored connectors)
- Classic tree
- Interactions:
- Collapse / expand nodes (default: collapsed except root)
- Collapse all / expand all
- Array-path-only filter
- Canvas controls:
- Zoom (20% ~ 200%)
- Pan
- Canvas fullscreen mode
cd <project-root>
./start.shOpen:
This is a static frontend project and can be deployed to any static host.
cd <project-root>
python3 -m http.server 8080- Upload files to a web root (example:
/var/www/json-tree-parser):
index.htmlstyle.cssscript.jsjsonTreeCore.js
- Nginx config:
server {
listen 80;
server_name your-domain.com;
root /var/www/json-tree-parser;
index index.html;
location / {
try_files $uri $uri/ /index.html;
}
}- Reload:
nginx -t
sudo systemctl reload nginxFROM nginx:stable-alpine
WORKDIR /usr/share/nginx/html
COPY index.html style.css script.js jsonTreeCore.js ./
EXPOSE 80docker build -t json-tree-parser:1.0.0 .
docker run -d --name json-tree-parser -p 8080:80 json-tree-parser:1.0.0- Import the repository
- Leave Build Command empty
- Set Output Directory to
.
npm test- Detailed deployment guide:
DEPLOYMENT.md