in reply to Re^7: Create JSON patch
in thread Create JSON patch

> work quite well for the last 43 years for all kind of text files, and ...

text-diff / patch support "move" operations?

No. Did I write that anywhere?

Alexander

--
Today I will gladly share my knowledge and experience, for there are no sweeter words than "I told you so". ;-)

Replies are listed 'Best First'.
Re^9: Create JSON patch [solved]
by LanX (Saint) on Oct 07, 2017 at 19:42 UTC
    Text diff is operating on a linear structure, an ordered list of lines (and this successfully for 43 years already ...)

    JSON describes a tree structure, and already the question how to order one level before comparing is problematic because the RFCs are not clear.

    Likening both is tempting but problematic.

    But I agree with you, I don't wanna spend more thought on this neither ...

    ...and a trivial solution is obvious:

    Patch: Remove all elements of A and insert all elements of B.

    Problem solved, thread closed! :)

    Cheers Rolf
    (addicted to the Perl Programming Language and ☆☆☆☆ :)
    Je suis Charlie!