python-json-pointer icon indicating copy to clipboard operation
python-json-pointer copied to clipboard

Ability to control how verbose the JsonPointerException is

Open shaybensasson opened this issue 3 years ago • 0 comments

Hi, Love this library.

I'm using it for JsonPointing to an element inside a JSON schema. My schema files could be ~10k lines. When a member is not found, this line formats (and dumps) the entire doc inside the message via this line:

raise JsonPointerException("member '%s' not found in %s" % (part, doc))

It would be wonderful to control the dumping of the doc to the exception message (e.g. Enabled by default, Disabled otherwise - in this case just the member is formatted).

Thanks

shaybensasson avatar Jun 06 '22 10:06 shaybensasson