AzureBlueSolutions.Json.NET
0.2.1
dotnet add package AzureBlueSolutions.Json.NET --version 0.2.1
NuGet\Install-Package AzureBlueSolutions.Json.NET -Version 0.2.1
<PackageReference Include="AzureBlueSolutions.Json.NET" Version="0.2.1" />
<PackageVersion Include="AzureBlueSolutions.Json.NET" Version="0.2.1" />
<PackageReference Include="AzureBlueSolutions.Json.NET" />
paket add AzureBlueSolutions.Json.NET --version 0.2.1
#r "nuget: AzureBlueSolutions.Json.NET, 0.2.1"
#:package AzureBlueSolutions.Json.NET@0.2.1
#addin nuget:?package=AzureBlueSolutions.Json.NET&version=0.2.1
#tool nuget:?package=AzureBlueSolutions.Json.NET&version=0.2.1
AzureBlueSolutions.Json.NET
A high-performance JSON parsing and sanitization library built on Newtonsoft.Json, with extra features for LSP-friendly token spans and recovery.
What is it?
AzureBlueSolutions.Json.NET is a resilient JSON parsing solution that goes far beyond standard JSON parsers. It provides:
Safe parsing with normalization and fallback recovery. The library automatically detects and repairs common JSON formatting issues like trailing commas, missing closing brackets, unterminated strings, and JavaScript-style comments. When strict parsing fails, it progressively applies sanitization passes�from conservative fixes to aggressive recovery�maximizing the chance of extracting valid data from malformed input. This multi-stage approach means you can work with real-world JSON that doesn't always follow the spec perfectly, without manual preprocessing.
Optional token spans and JSON path mapping for editor integrations. Every parsed document can generate detailed metadata about token locations, types, and boundaries in the source text. This enables features like syntax highlighting, intelligent autocomplete, go-to-definition, and error underlining in code editors and LSP servers. The library tracks exactly where each property name, value, bracket, and comma appears in the original document, making it trivial to build rich editing experiences.
Async sanitization for malformed JSON. All parsing and recovery operations support cancellation tokens and can run asynchronously, with cooperative yielding to keep UI threads responsive during long operations. This makes the library suitable for processing large or complex documents in interactive applications without blocking the user interface.
Quick Start
using AzureBlueSolutions.Json.NET;
var json = @"{
// trailing comma
""name"": ""Demo"",
}
";
var result = JsonParser.ParseSafe(json);
if (result.Success) Console.WriteLine(result.Root);
Full Documentation
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | 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. |
-
net8.0
- Microsoft.NETCore.Platforms (>= 7.0.4)
- Newtonsoft.Json (>= 13.0.4)
- OmniSharp.Extensions.LanguageServer (>= 0.19.9)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
See GitHub releases for detailed changelogs:
https://github.com/AzureBlueSolutions/AzureBlueSolutions.Json.NET/releases