Closed Maxim-Filimonov closed 10 years ago
I'm not sure if this is the best way to deal with that (it would probably be quite confusing at times), but I think it's still an improvement, so :+1:
It might be better to enforce ordering by default, I find that's what I want most of the time actually. That way, you can get much better diffs because we are not fuzzy-matching elements anymore.
I thought about the ordering too. I actually didn't use ordered most of the time because I don't want to push this knowledge inside json schema. Moreover, most of the time I will specify schema once even if there are multiple elements and just ignore extra ones
I have found myself often matching arrays of objects inside another object. It's really hard to find a source of error when it just prints "does not contain a matching element {some_massive_object_here}".