Quidest?

Comparing JSON

ยท Lorenzo Drumond

In tests, we usually want to compare JSON strings while ignoring differences due to whitespace. A good way to do this is to normalise them both, by unmarshalling them and then re-marshalling, eliminating any irrelevant whitespace.

References

#marshalling #comparing #unit #computer_science #json #programming #code #automation #test