An interactive JSON viewer widget for Jupyter notebooks using React JSON View.
- 🔍 Interactive JSON tree view with expand/collapse
- 🎨 Multiple theme support (monokai, solarized, etc.)
- 🎯 Support Jupyter notebooks and marimo
- 📝 Support Multi-line strings
pip install json-view-anywidgetuv pip install json-view-anywidgetgit clone https://github.com/bigeagle/anywidget-react-json-view.git
cd anywidget-react-json-view
uv pip install -e .from rjv_anywidget import JsonWidget
# Create a simple JSON viewer
widget = JsonWidget({
"name": "John",
"age": 30,
"city": "New York"
})
widget# Use different themes
widget = JsonWidget(
data=your_data,
theme="monokai" # Available themes: "rjv-default", "monokai", "solarized", etc.
)
# Display in Jupyter
widget# Install dependencies
pnpm install
# Development mode (with hot reload)
pnpm run dev
# Build for production
pnpm run build# Build package
uv build
# Install locally for testing
uv pip install -e ..
├── src/
│ ├── widget.tsx # React component source
│ ├── index.css # Component styles
│ └── rjv_anywidget/ # Python package
│ ├── __init__.py
│ ├── widget.py # JsonWidget class
│ └── static/ # React build output
├── pyproject.toml # Python package configuration
├── package.json # Frontend build configuration
└── dist/ # Build outputs
MIT License