Simple JSON formatting/pretty-printing for .NET
C# PowerShell Batchfile
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
build
src/JsonFormatterPlus
test/JsonFormatterPlus.Tests
.gitattributes
.gitignore
JsonFormatterPlus.sln
license.txt
readme.md

readme.md

JsonFormatterPlus

This library provides some simple JSON formatting / pretty printing functionality for .NET. It was originally based on Mark Rogers' JsonPrettyPrinterPlus, but has evolved from there.

Installation

PM> Install-Package JsonFormatterPlus

Example

Pretty-printing a JSON string:

string formattedJson = JsonFormatter.Format(unformattedJson);

Minifying a JSON string:

string minifiedJson = JsonFormatter.Minify(json);

(I told you it was simple!)

What sets this apart from JsonPrettyPrinterPlus?

JsonPrettyPrinterPlus works very well. However, I wanted to make the project suitable for .NET 2.0, 3.0, and the various client profiles. This meant that the extension methods and the dependency on System.Web.Extensions had to go! A few extra 'quality of life' changes were also made, such as providing JSON minification, etc.

License

JsonFormatterPlus is distributed under the MIT license.