in reply to Re^6: Create JSON patch (updated)
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?

I don't think so, that's why I asked the OP for clarification, what his "basic" problem is.

We are comparing apples with gala dinners, the OP must be clearer about what kind of pony he wants.

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

Replies are listed 'Best First'.
Re^8: Create JSON patch
by afoken (Chancellor) on Oct 07, 2017 at 18:44 UTC

    > 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". ;-)
      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!