Is there any lightweight, preferably pure lua, library for lua to parse json content? Basically I wanna augment my ngnix with a lua module that needs to verfiy some information from a json object I'm getting from Redis.
The object looks like as follow:
{
"data": {
"user": {
"username": "username",
"type": "TYPE"
}
},
"passport": {
"user": "uuid"
},
}
In my lua code, I need to verify if the data.user.username exists. Then I can let the nginx continue with its redirection. Can anybody please show me an example of how can I achieve that?