Skip to main content

Function: canonicalJson()

canonicalJson(value, options?): string

Defined in: packages/core/src/core/canonical-json.ts:59

JSON with object keys sorted by UTF-16 code unit at every depth. Otherwise it reads values as JSON.stringify does: toJSON and boxed primitives first, values JSON cannot hold dropped from objects and null in arrays, and a non-finite number null. A bigint is null rather than a TypeError.

Parameters​

value​

unknown

options?​

CanonicalJsonOptions = {}

Returns​

string