JsonViewer.Blazor
0.0.2-beta
See the version list below for details.
dotnet add package JsonViewer.Blazor --version 0.0.2-beta
NuGet\Install-Package JsonViewer.Blazor -Version 0.0.2-beta
<PackageReference Include="JsonViewer.Blazor" Version="0.0.2-beta" />
<PackageVersion Include="JsonViewer.Blazor" Version="0.0.2-beta" />
<PackageReference Include="JsonViewer.Blazor" />
paket add JsonViewer.Blazor --version 0.0.2-beta
#r "nuget: JsonViewer.Blazor, 0.0.2-beta"
#:package JsonViewer.Blazor@0.0.2-beta
#addin nuget:?package=JsonViewer.Blazor&version=0.0.2-beta&prerelease
#tool nuget:?package=JsonViewer.Blazor&version=0.0.2-beta&prerelease
🚀 JSON Viewer Component for Blazor
<div align="center">

A powerful, feature-rich JSON viewer component for Blazor applications with VS Code-style syntax highlighting.
Demo | Documentation | Report Bug | Request Feature
</div>
✨ Features
- 🎨 VS Code-style syntax highlighting
- 🌓 Dark & Light theme support with persistence
- 🔍 Real-time search with match highlighting and navigation
- 📊 JSON statistics (size, depth, type distribution)
- 📝 Edit mode with auto-formatting and validation
- 📋 Copy & Export functionality
- ⌨️ Keyboard shortcuts (Enter, Shift+Enter for search navigation)
- 🔢 Line numbers with active line highlighting
- 🎯 Expand/Collapse individual or all nodes
- 📱 Fully responsive design for mobile, tablet, and desktop
- ⚡ High performance - handles large JSON files efficiently
- 🎭 Smooth animations and transitions
📦 Installation
Install via NuGet Package Manager:
dotnet add package JsonViewer.Blazor
Or via Package Manager Console:
Install-Package JsonViewer.Blazor
🚀 Quick Start
1️⃣ Add namespace to _Imports.razor:
@using JsonViewerComponent
@using JsonViewerComponent.Components
2️⃣ Use in your component:
@page "/json-demo"
<JsonViewer JsonData="@jsonString" IsEditable="true" />
@code {
private string jsonString = @"{
""name"": ""John Doe"",
""age"": 30,
""email"": ""john.doe@example.com"",
""hobbies"": [""reading"", ""gaming"", ""coding""]
}";
}
📖 Usage Examples
Read-Only Mode
<JsonViewer JsonData="@jsonData" IsEditable="false" />
Editable Mode with Two-Way Binding
<JsonViewer @bind-JsonData="jsonData" IsEditable="true" />
@code {
private string jsonData = "{}";
}
Dynamic JSON Loading
<button @onclick="LoadSampleData">Load Sample</button>
<JsonViewer JsonData="@jsonData" IsEditable="true" />
@code {
private string jsonData = "";
private void LoadSampleData()
{
jsonData = @"{""userId"": 1, ""userName"": ""Alice""}";
}
}
⌨️ Keyboard Shortcuts
| Shortcut | Action |
|---|---|
Enter |
Navigate to next search match |
Shift + Enter |
Navigate to previous search match |
Escape |
Clear search (when search is active) |
🎨 Theme Support
The component automatically saves your theme preference to localStorage:
@* Theme persists across page refreshes *@
<JsonViewer JsonData="@jsonData" IsEditable="true" />
📊 JSON Statistics
View detailed statistics about your JSON:
- Total Size (bytes)
- Total Properties
- Object Count
- Array Count
- Max Depth
- Average Array Length
Access statistics via the stats button in the sidebar.
🔍 Search Features
- Real-time highlighting of all matches
- Match counter showing current match / total matches
- Navigation buttons to jump between matches
- Keyboard support for quick navigation
- Case-insensitive search
🛠️ Configuration
Currently, the component works out-of-the-box with minimal configuration. Future versions will support:
- Custom themes
- Plugin system
- Additional export formats
- And more!
🤝 Contributing
We welcome contributions! Here's how you can help:
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
Please read our Contributing Guide for more details.
🐛 Bug Reports & Feature Requests
Found a bug or have an idea? Please open an issue:
📜 License
This project is licensed under the MIT License - see the LICENSE file for details.
💖 Support
If you find this project helpful, please consider:
- ⭐ Starring the repository
- 🐛 Reporting bugs or suggesting features
- 📢 Sharing with others
- ☕ Sponsoring the project
👨💻 Author
Parsa Panahpoor
- GitHub: @parsapanahpoor
- Website: Your Website
🌟 Acknowledgments
Special thanks to all contributors and the Blazor community!
<div align="center">
Made with ❤️ by JsonViewer Component
</div>
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 is compatible. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net6.0
- Microsoft.AspNetCore.Components.Web (>= 6.0.0)
- Newtonsoft.Json (>= 13.0.3)
-
net7.0
- Microsoft.AspNetCore.Components.Web (>= 6.0.0)
- Newtonsoft.Json (>= 13.0.3)
-
net8.0
- Microsoft.AspNetCore.Components.Web (>= 6.0.0)
- Newtonsoft.Json (>= 13.0.3)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.0.6 | 34 | 12/17/2025 |
| 0.0.5 | 32 | 12/16/2025 |
| 0.0.4-beta | 135 | 12/3/2025 |
| 0.0.3-beta | 138 | 12/3/2025 |
| 0.0.2-beta | 348 | 11/19/2025 |
| 0.0.1-beta | 187 | 11/16/2025 |
🎉 Version 0.0.2-beta - Beta Release
✨ New Features:
• VS Code-style JSON viewer with syntax highlighting
• Search functionality with match navigation (Enter/Shift+Enter)
• Expand/collapse all nodes
• JSON statistics panel with detailed metrics
• Theme toggle (Dark/Light) with localStorage persistence
• Copy and export capabilities
• Edit mode with auto-formatting and validation
• Responsive design for mobile and tablet
• Active line highlighting
• Smooth scroll navigation
🐛 Bug Fixes:
• Improved performance for large JSON files
• Fixed search highlighting edge cases
• Enhanced theme switching smoothness
📚 Documentation: https://github.com/JsonViewer-Component/Blazor#readme
🐛 Report Issues: https://github.com/JsonViewer-Component/Blazor/issues
💬 Discussions: https://github.com/JsonViewer-Component/Blazor/discussions