In this particular example you could do something like in your proposal where you have the T implement an interface with toJsonObject or something, but where it becomes messy IMO is when you want a typeclass that does something to more than one T, do you then accept two T's and convert one to U and have that one accept the 2nd one.