JSON dump separators
In jwt_tool.py, after a payload is modified, you use json.dumps() to convert the ordered dictionary into a json object, then b64 encode it.
newPaylB64 = base64.urlsafe_b64encode(json.dumps(newpaylDict,separators=(",",":")).encode()).decode('UTF-8').strip("=")
My question is regarding the json.dumps() compact encoding (i.e. the separators=(",",":")). The result is that spaces in the json object are removed so a payload like this {"login": "taylor"}becomes {"login":"taylor"}. The space after the colon has been removed.
Referring to RFC 7519 standard: "The JSON object consists of zero or more name/value pairs (or members), where the names are strings and the values are arbitrary JSON values. These members are the claims represented by the JWT. This JSON object MAY contain whitespace and/or line breaks before or after any JSON values or structural characters ..."
Thank you for the tool!