This is a Python 3 package for a JCS (RFC 8785) compliant JSON canonicalization.
The main author of this code is Anders Rundgren. The original source code is at cyberphone/json-canonicalization including comprehensive test data.
$ pip install jcs
import jcs
data = jcs.canonicalize({"tag": 4})