3 ms·
This is what unit testing is for. Test the methods that validate and return your expected object structures. This catches other things like a structure changing
by gregmac 9y ago
This is what unit testing is for. Test the methods that validate and return your expected object structures. This catches other things like a structure changing (as simple as a property being modified), ensuring you can handle malformed input (even if it's valid JSON) and any other data validation rules you have.