Cjson Expected value but found invalid token at character Error

Hi Team,

I’m trying to parse a response body with the below plugin code, but I’m getting the below error. Can someone help with this issue?

function plugin:response(conf)
local resp = kong.service.response.get_raw_body()
if resp ~= nil and resp ~= “” then
local dec = cjson.decode(res_body)
kong.log(dec)
else
kong.log(“Invalid response”)
end
end

error : Expected value but found invalid token at character 1
stack traceback:
coroutine 0:
[C]: in function ‘decode’

Please double-check if you are really decoding “res_body”.