gravity9-tech / json-patch-path

An RFC 6902 (JSON Patch) and reverse, plus RFC 7386 (JSON Merge Patch), implementation in Java using Jackson (2.x)
Other
11 stars 1 forks source link

Expose operations in JsonPatch class #63

Closed GuanqunYang193 closed 6 months ago

GuanqunYang193 commented 6 months ago

Is it a good idea to expose the List<JsonPatchOperation> operations; in JsonPatch class so that users are able to iterate the list to do more check before apply the patch? Right now we can only visit the list using reflection.

Why not check before JsonPatch Object is built? Check and iterate the bare JsonNode is not that convenient since redundant syntactical check needs to be done, which is already covered by the package.

Willing to submit a PR for this change.

piotrlg9 commented 6 months ago

Operations field is accessible via getOperations() method. What is missing?

GuanqunYang193 commented 6 months ago

Operations field is accessible via getOperations() method. What is missing?

sorry, wrong from my ide side.