Hello Alban, You may be interested to know that the Nmap Scripting Engine (NSE) also does this: https://github.com/nmap/nmap/blob/5325fa143c8a2a1f0ad7aa77b856c5e5c036ac46/nse_main.lua#L176-L213 It's good to see you generalized it into a library. I'm curious, do you have an instance where there is more than one level of nesting? -- Patrick Donnelly