It seems that the parameters of the comparator `left` and `right` were swapped:  `left` got the complex object and `right` got the string, which is different from the defined types and docs.
It seems that the parameters of the comparator
leftandrightwere swapped:leftgot the complex object andrightgot the string, which is different from the defined types and docs.