-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
Hi,
According to https://www.rfc-editor.org/rfc/rfc6901#section-4 the string "~01" should be evaluated to "~1" but is currently evaluated to "/"
local jsonpatch = require('jsonpatch')
local o = {
}
local operations = {
{ op = "add", path = "/~01", value = "value" },
}
print("object before")
for k,v in pairs(o) do print(k, v) end
jsonpatch.apply(o, operations)
print("object after")
for k,v in pairs(o) do print(k, v) end
Result of execution
object before
object after
/ value
I think the two following lines in decode_token
t = string.gsub(token,"~0","~")
t = string.gsub(t,"~1","/")
should be swapped into
t = string.gsub(token,"~1","/")
t = string.gsub(t,"~0","~")
Metadata
Metadata
Assignees
Labels
No labels