You can use the cjson module:
ngx.print(require("cjson").encode(ngx.req.get_uri_args()))
If you are starting to develop with OpenResty it's helpful to check what things you have available:
* main API - https://github.com/openresty/lua-nginx-module
* other bundled modules - https://github.com/openresty/
W dniu piątek, 31 maja 2019 13:44:23 UTC+2 użytkownik Hadi Rezaee napisał:
Hello there,
I need to save the output of "ngx.req.get_uri_args" function into a json string. Can anybody show me what is correct way ?