Oakrey.Applications.Json
8.0.0
dotnet add package Oakrey.Applications.Json --version 8.0.0
NuGet\Install-Package Oakrey.Applications.Json -Version 8.0.0
<PackageReference Include="Oakrey.Applications.Json" Version="8.0.0" />
<PackageVersion Include="Oakrey.Applications.Json" Version="8.0.0" />
<PackageReference Include="Oakrey.Applications.Json" />
paket add Oakrey.Applications.Json --version 8.0.0
#r "nuget: Oakrey.Applications.Json, 8.0.0"
#:package Oakrey.Applications.Json@8.0.0
#addin nuget:?package=Oakrey.Applications.Json&version=8.0.0
#tool nuget:?package=Oakrey.Applications.Json&version=8.0.0
Oakrey.Applications.Json
Stream-based JSON loading and reliable JSON saving through IFileService and
System.Text.Json.
Features
- Synchronous and asynchronous deserialization.
- Cancellation-aware batch loading with deterministic file ordering supplied by
IFileService. - Reliable synchronous and asynchronous serialization with errors propagated to the caller.
- Pre-serializes content before opening the destination, preventing serializer failures from truncating an existing file.
- Clears temporary UTF-8 serialization buffers after writing.
- Validates batch names, extensions, duplicate outputs, and target-folder containment.
- Uses placeholder-based logging and logs only terminal file or folder names.
- Emits OpenTelemetry activity spans.
Dependencies
Oakrey.Applications.Files.AbstractionsOakrey.Applications.Json.AbstractionsOakrey.Collections2.1.0Oakrey.Log.Abstractions3.0.0Oakrey.Telemetry2.0.1
Installation
dotnet add package Oakrey.Applications.Json
Registration
services.AddSingleton<IFileService, FileService>();
services.AddSingleton<IJsonService, JsonService>();
Usage
AppConfig config = await jsonService.LoadJsonAsync<AppConfig>(
"config/app.json",
cancellationToken);
jsonService.SaveJson(config, "config/app.json");
await jsonService.SaveJsonAsync(config, "config/app.json");
List<AppConfig> configs = await jsonService.LoadObjectsFromJsonFilesAsync<AppConfig>(
"config",
"json",
cancellationToken);
Batch saving
SaveJsonFiles accepts objects implementing IName. Names must be simple file names:
rooted paths, separators, traversal segments, invalid characters, trailing spaces or periods,
and duplicate case-insensitive output names are rejected before writing begins.
License
MIT. Copyright (c) Oakrey 2016-present.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net11.0 is compatible. |
-
net11.0
- Oakrey.Applications.Files.Abstractions (>= 8.0.0)
- Oakrey.Applications.Json.Abstractions (>= 8.0.0)
- Oakrey.Collections (>= 3.0.0)
- Oakrey.Log.Abstractions (>= 4.0.0)
- Oakrey.Telemetry (>= 3.0.0)
NuGet packages (2)
Showing the top 2 NuGet packages that depend on Oakrey.Applications.Json:
| Package | Downloads |
|---|---|
|
Oakrey.Applications.Base
A foundational .NET library for building modular WPF applications. Provides application lifecycle management, MVVM ViewModel resolution, structured logging, telemetry, and sequential or parallel service preloading with full unhandled-exception coverage. |
|
|
Oakrey.Applications.Settings
WPF-only (.NET 11 Windows) library providing ISettingsService with persistent and volatile typed key-value settings, SettingsBase for bindable ViewModelBase-derived settings classes, CallerMemberName key inference, built-in window bounds restore via RestoreBounds, and explicit dependency-injection integration. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 8.0.0 | 54 | 11/15/2026 |
| 7.0.0 | 325 | 7/20/2026 |
| 6.0.2 | 143 | 7/8/2026 |
| 6.0.1 | 135 | 7/3/2026 |
| 6.0.0 | 159 | 5/22/2026 |
| 3.0.4 | 137 | 5/22/2026 |
| 3.0.3 | 155 | 5/15/2026 |
| 3.0.2 | 160 | 3/13/2026 |
| 3.0.1 | 179 | 2/11/2026 |
| 3.0.0 | 464 | 11/18/2025 |
| 2.1.2 | 224 | 10/10/2025 |
| 2.1.1 | 282 | 9/29/2025 |
| 2.1.0 | 248 | 9/24/2025 |
| 2.0.0 | 376 | 6/9/2025 |
| 1.0.0 | 330 | 4/17/2025 |