leadpony / justify

Justify is a JSON validator based on JSON Schema Specification and Jakarta JSON Processing API (JSON-P).
Apache License 2.0
96 stars 18 forks source link

Added APIs to specify external JSONParser as source #45

Closed simon-greatrix closed 4 years ago

simon-greatrix commented 4 years ago

Hi,

First thank you for this lovely library.

My own business case requires the validation of JSON that already exists. For example, verifying that a JSON structure still conforms to the schema after applying a patch, or where the schema is not known at the time of the initial parse.

Whilst I understand you are considering adapting this library to work in a non-streaming mode, it occurred to me that being able to specify a JsonParser instance wherever the API offered a choice of Reader or InputStream would allow a solution that was at least more efficient that converting the existing JSON structure back to text and then re-reading it.

Please would you consider incorporating these changes into your library.

Kind Regards,

Dr Simon Greatrix

leadpony commented 4 years ago

Thank you @simon-greatrix for sending PR. I like the new API extended by you.