If the target location does not exist the current implementation does nothing (which is good) but does not fail (which is bad).
local jsonpatch = require('jsonpatch')
local o = { key = "value" }
local operations = {
{ op = "remove", path = "/otherkey", value = "othervalue" },
}
print("object before")
for k,v in pairs(o) do print(k, v) end
print("err:", jsonpatch.apply(o, operations))
print("object after")
for k,v in pairs(o) do print(k, v) end
object before
key value
err: nil
object after
key value