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
                    
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="AzureBlueSolutions.Json.NET" Version="0.2.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="AzureBlueSolutions.Json.NET" Version="0.2.1" />
                    
Directory.Packages.props
<PackageReference Include="AzureBlueSolutions.Json.NET" />
                    
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 AzureBlueSolutions.Json.NET --version 0.2.1
                    
#r "nuget: AzureBlueSolutions.Json.NET, 0.2.1"
                    
#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 AzureBlueSolutions.Json.NET@0.2.1
                    
#: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=AzureBlueSolutions.Json.NET&version=0.2.1
                    
Install as a Cake Addin
#tool nuget:?package=AzureBlueSolutions.Json.NET&version=0.2.1
                    
Install as a Cake Tool

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

https://jsonnet.azurebluesolutions.net

Product 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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.2.1 38 11/8/2025
0.2.0 38 11/8/2025
0.1.1 119 11/6/2025
0.1.0 194 11/6/2025