Skip to content
JSON canonicalize function
Branch: master
Clone or download
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.
examples
lib
test
.gitignore
.travis.yml
LICENSE
README.md
package.json

README.md

Build Status Coverage Status

canonicalize

JSON canonicalize function. Creates crypto safe predictable canocalization of JSON as defined by draft-rundgren-json-canonicalization-scheme

Usage

JSON.canonicalize = require('canonicalize');

const json = {
  "1": {"f": {"f": "hi","F": 5} ,"\n": 56.0},
  "10": { },
  "": "empty",
  "a": { },
  "111": [ {"e": "yes","E": "no" } ],
  "A": { }
}

console.log(JSON.canonicalize(json));

Install

npm install canonicalize --save

Test

npm test
You can’t perform that action at this time.