Skip to content
Branch: master
Find file History
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
..
Failed to load latest commit information.
es6numbercli
es6numberserializer
json.net.sign
jsoncanonicalizer
verify-canonicalization
verify-numbers
.editorconfig
.gitignore
README.md
dotnet.sln

README.md

JSON Canonicalizer for .NET

The jsoncanonicalizer folder contains the source code for a JCS compliant canonicalizer written in C# for .NET Core 3 and forward.

Using the JSON canonicalizer

using Org.Webpki.JsonCanonicalizer;

    JsonCanonicalizer jsonCanonicalizer = new JsonCanonicalizer(jsonString);
    string result = jsonCanonicalizer.GetEncodedString();

The JsonCanonicalizer() may also be invoked with a byte[] array holding JSON data in UTF-8 format.

In addition to GetEncodedString() there is a method GetEncodedUTF8() returning canonicalized data as a byte[] array.

Constraints

The JSON canonicalizer only accepts a JSON Object or Array as the top level data type.

You can’t perform that action at this time.