When encoding the JSON string with the dump method, it will insert some spaces (after ":" or ",") even without pretty print active. It will add some undesired extra bytes when the data is just going over the wire. In my case it is important as I am encoding JSON Web Tokens (JWT), and every byte its important as the token is being transmitted in every request.
When encoding the JSON string with the dump method, it will insert some spaces (after ":" or ",") even without pretty print active. It will add some undesired extra bytes when the data is just going over the wire. In my case it is important as I am encoding JSON Web Tokens (JWT), and every byte its important as the token is being transmitted in every request.