It can be tricky to develop a narrow schema for a large JSON, especially one that has optional keys. It would be helpful if when narrow returns false there was a way to find out which type comparison failed. I'd mainly use this while debugging, but there may be other runtime use cases.
(Example: I've run into this a bunch while parsing RSS feeds)
I have a branch where I've tried creating a whole generic traverse & object diff algorithm. A thorough nested diff would be great, but so far the complexity is maybe not worth it.
It can be tricky to develop a narrow schema for a large JSON, especially one that has optional keys. It would be helpful if when
narrow
returnsfalse
there was a way to find out which type comparison failed. I'd mainly use this while debugging, but there may be other runtime use cases.(Example: I've run into this a bunch while parsing RSS feeds)