Expected value but found T_OBJ_END at character 22
3 处理方案 - 正确 json 示范
whiletruedo--Expected value but found T_END at character 1--Expected value but found T_OBJ_END at character 22local str ='{"success":0,"code":[]}'local err,tbl =pcall(function(str)return jsonLib.decode(str)end,str)print(err)print(tbl)sleep(1000)end
4 处理方案 - 错误 json 示范
whiletruedo--Expected value but found T_END at character 1--Expected value but found T_OBJ_END at character 22local str ='{"success":0,"code":[}'local err,tbl =pcall(function(str)return jsonLib.decode(str)end,str)print(err)print(tbl)sleep(1000)end