Soenneker.Blazor.LogJson 11.0.1976

Prefix Reserved
dotnet add package Soenneker.Blazor.LogJson --version 11.0.1976
                    
NuGet\Install-Package Soenneker.Blazor.LogJson -Version 11.0.1976
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Soenneker.Blazor.LogJson" Version="11.0.1976" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Soenneker.Blazor.LogJson" Version="11.0.1976" />
                    
Directory.Packages.props
<PackageReference Include="Soenneker.Blazor.LogJson" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Soenneker.Blazor.LogJson --version 11.0.1976
                    
#r "nuget: Soenneker.Blazor.LogJson, 11.0.1976"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Soenneker.Blazor.LogJson@11.0.1976
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Soenneker.Blazor.LogJson&version=11.0.1976
                    
Install as a Cake Addin
#tool nuget:?package=Soenneker.Blazor.LogJson&version=11.0.1976
                    
Install as a Cake Tool

alternate text is missing from this package README image alternate text is missing from this package README image alternate text is missing from this package README image alternate text is missing from this package README image alternate text is missing from this package README image

Soenneker.Blazor.LogJson

A Blazor interop utility for writing structured values and bounded HTTP bodies to grouped entries in the browser developer console.

Grouped JSON in the browser console

Installation

dotnet add package Soenneker.Blazor.LogJson
using Soenneker.Blazor.LogJson.Registrars;

builder.Services.AddLogJsonInteropAsScoped();

Inject the service into a component:

@using Soenneker.Blazor.LogJson.Abstract
@inject ILogJsonInterop JsonLog

Log a value

await JsonLog.Log(
    new
    {
        orderId = order.Id,
        status = order.Status
    },
    group: "Order updated",
    level: "info");

The value is transferred through Blazor's normal JavaScript serializer. A string beginning with { or [ is parsed as JSON when valid; other strings are logged unchanged. level selects a browser console function such as log, info, warn, or error; an unknown or non-callable member falls back to console.log.

Log an HTTP request or response

using var request = new HttpRequestMessage(HttpMethod.Post, "api/orders")
{
    Content = JsonContent.Create(new { sku = "ABC-123", quantity = 2 })
};

await JsonLog.LogRequest(request);

using HttpResponseMessage response = await Http.SendAsync(request);
await JsonLog.LogResponse(response);

Request groups include the method and URI. Response groups include the status plus the originating method and URI when available. These methods log the body only; they do not log request or response headers.

Bodies are buffered up to 64 KiB. A body with a larger declared or observed size is replaced with a skipped-body message, and text over 64K characters is truncated. Logging may buffer otherwise streaming HttpContent, so use these helpers for diagnostics rather than high-throughput production paths.

Sensitive data

Browser-console output is visible to anyone with access to the running browser and may be captured by browser tooling. Do not log authorization data, cookies, access tokens, personal information, payment details, or URLs/query strings containing secrets. Prefer explicitly shaped diagnostic objects over logging entire domain or transport objects.

Interop, serialization, content-read, and cancellation failures are returned to the caller. Await logging when you need to observe those failures; isolate it deliberately if diagnostic logging must never affect the application operation.

Product Compatible and additional computed target framework versions.
.NET net11.0 is compatible. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on Soenneker.Blazor.LogJson:

Package Downloads
Soenneker.Blazor.ApiClient

A lightweight and efficient API client wrapper for Blazor applications, simplifying HTTP communication with support for asynchronous calls, cancellation tokens, and JSON serialization.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
11.0.1976 347 11/19/2026
11.0.1975 127 11/19/2026
11.0.1974 81 11/19/2026
11.0.1973 103 11/19/2026
11.0.1972 73 11/18/2026
11.0.1971 61 11/18/2026
11.0.1968 213 11/18/2026
11.0.1967 290 11/16/2026
11.0.1966 136 11/16/2026
11.0.1965 184 11/15/2026
11.0.1964 304 11/15/2026
11.0.1963 152 11/15/2026
11.0.1962 319 11/14/2026
11.0.1961 407 11/12/2026
11.0.1960 181 11/11/2026
11.0.1959 133 11/11/2026
11.0.1957 177 11/11/2026
11.0.1956 85 11/11/2026
11.0.1955 150 11/11/2026
11.0.1954 188 11/11/2026
Loading failed

Updated Multiple NuGet packages