toCanonicalJson method

String toCanonicalJson()

The canonical JSON encoding: every map's keys sorted recursively, stable 2-space indent, so git diffs are minimal and the encoding is a pure function of the manifest's VALUE (not its construction order).

Implementation

String toCanonicalJson() =>
    const JsonEncoder.withIndent('  ').convert(canonical(toDocument()));