I'm hesitant about this logic, particularly reliance on `equals()` being implemented for anything that is to be sent.
The `x.toString()` isn't "jsonable" so the method name is also misleading I think.
However, I can see why this is useful.