Support for JSON Patch (http://jsonpatch.com/)?

53 views
Skip to first unread message

Tatu Saloranta

unread,
Apr 27, 2015, 5:32:52 PM4/27/15
to jacks...@googlegroups.com
Given that Jackson has decent (if quite basic) support for using JSON Pointer via tree model, and a few ideas of how to add more with introduction of streaming filtering in 2.6.0, it might be time to think of possible future improvements in this general area.
Since it looks like adoption of JSON Patch is closely related to use of JSON Pointer, perhaps it would be good to see what kind of support/integration would make most sense.

I know that Francis implemented support a while ago at:

https://github.com/fge/json-patch

and that it might be that this would actually work as is (esp. if a new maintainer is found?).
At very least it could serve as a starting point for API. I assume implementation itself is solid, based on his earlier work, so quite possibly repurposable.

But what I am most curious about is the API aspect: are there some natural extension points where this would/should work directly from Jackson? What would be natural flow of things? Would it be possible to somehow integrate things so that -- for example -- one could give a JSON Patch to ObjectReader, to update things in the fly?
While thinking in terms of Tree Model is intuitive here (since operations are performed on logical tree), I suspect it is possible to make this work in streaming manner, similar to how JSON Pointer filtering can be made to work.

So. I would like to hear any ideas around possible use, usage patterns anyone might have, regarding JSON Patch.

 -+ Tatu +-


Reply all
Reply to author
Forward
0 new messages