Open
Description
I installed nginx-full and trying to use json.lua with NGINX:
Example:
nginx.conf:
location /test { default_type 'text/plain'; content_by_lua_block { local json = require("json") ngx.say(json.decode('[1,2,3,{"x":10}]')) }
then curl http://localhost:8080/test and got 500 error. But everything is ok in lua console:
`> json = require("json")
json.encode({ 1, 2, 3, { x = 10 } })
[1,2,3,{"x":10}]`
What I am doing wrong?
Metadata
Metadata
Assignees
Labels
No labels