This is also https://bugs.debian.org/848041 (also the much older topic Update to RT 4.2.1 -> JSON error after login).
I believe it’s caused by JSON::XS being installed, and a more recent version of JSON::XS removing the to_json method. I’m not sure exactly what the history is here, but Bug #94784 for JSON: Please recommend Cpanel::JSON::XS instead of JSON::XS suggests that there are known issues with JSON::XS.