util.jsonpointer: Change function prototype to allow anything
authorKim Alvefur <zash@zash.se>
Fri, 30 Jun 2023 18:45:18 +0200
changeset 13176 9364f0b5ecae
parent 13175 e2c3582ab9fa
child 13177 4906d4990ffe
util.jsonpointer: Change function prototype to allow anything But anything that's not a table can't be resolved into, which could happen in the middle, so eh.
teal-src/prosody/util/jsonpointer.tl
--- a/teal-src/prosody/util/jsonpointer.tl	Fri Jun 30 15:02:26 2023 +0200
+++ b/teal-src/prosody/util/jsonpointer.tl	Fri Jun 30 18:45:18 2023 +0200
@@ -9,7 +9,7 @@
 	return unescaped
 end
 
-local function resolve_json_pointer(ref : table, path : string) : any, ptr_error
+local function resolve_json_pointer(ref : any, path : string) : any, ptr_error
 	local ptr_len = #path+1
 	for part, pos in path:gmatch("/([^/]*)()") do
 		local token = unescape_token(part)