ASP.NET Core JsonViewer Component for Server-Side Blazor Based-on Alenaksu's Json-Viewer.
PM> Install-Package Texnomic.Blazor.JsonViewer
-
Reference hCaptcha & NuGet Package JavaScript Files In
Pages/_Host.cshtml
File:<head> <script src="_content/Texnomic.Blazor.JsonViewer/scripts/JsonViewer.js" type="text/javascript"></script> </head>
-
Drop-In JsonViewer Component & Bind Element Reference In
Example.razor
File:@using Texnomic.Blazor.JsonViewer <JsonViewer @ref="JsonViewerInstance"></JsonViewer>
-
Create Backing Element Reference In
Example.razor.cs
File:using Texnomic.Blazor.JsonViewer; protected JsonViewer JsonViewerInstance { get; set; } protected async ValueTask Example(string Json) { await JsonViewerInstance.Render(Json); }