idubrov / json-patch

RFC 6902 (JSON Patch) / RFC 7396 (JSON Merge Patch) implementation for Rust
Apache License 2.0
127 stars 17 forks source link

Expose the fields for all patch operations #5

Closed asayers closed 5 years ago

asayers commented 5 years ago

Hi! This patch exposes the constructors for AddOperation, RemoveOperation etc. For my application I need mutable access to the path-like fields (path and from), and this seems like the most straight-forward solution.

If you have some concerns about adding this stuff to the API surface, that's understandable... but API stability is overrated!

idubrov commented 5 years ago

Makes total sense to me. One can also argue that format of JSON Patch is a standard and should be part of public API.