Hello,
I'm looking to use Hamcrest matchers for whitespace-insensitive comparisons of generated JSON. When I saw IsEqualIgnoringWhiteSpace I assumed that it would compare Strings ignoring whitespace. However, it appears as though the logic is a bit more complicated than that - it seems to replace multiple whitespace characters with a single space which means that the following are not equal:
and
I would suggest that this matcher is renamed to IsEqualNormalisingWhiteSpace or something similar, with a new matcher created called IsEqualIgnoringWhiteSpace that actually removes all whitespace before comparison.