it does not seem impossible to port the library or write from scratch
but you will end up with another 3rd part library... on top of serialization though
from what i can see you need to diff 2 json elements (objects) and generate the json patch instructions to go from one to the other
those algorithms should already exist, in the library you linked