libs/json: Fix a typo and a logic error in json.lua to make luci.json.encode() work...