canonical_json

function of dascore.workflow.serialize source

canonical_json(
    obj: Any ,
    mode: Literal[‘fingerprint’, ‘document’] = fingerprint,
)-> ‘str’

Return the canonical JSON text of an object.

Keys are sorted, whitespace is stripped and non-ascii characters are escaped, so that equal objects give equal text on any platform.