boolean added

This commit is contained in:
Cooldude2606
2017-10-24 13:53:05 +01:00
parent be5498721f
commit 6b8f850b68

View File

@@ -74,15 +74,15 @@ function json_log(lua_table,no_log)
done[key] = true
if type(value) == 'table' then table.insert(result,json_log(value,true))
elseif type(value) == 'string' then table.insert(result,'"'..value..'"')
elseif type(value) == 'number' then table.insert(result,value)
else table.insert(result,key..':null') end
elseif type(value) == 'number' or type(value) == 'boolean' then table.insert(result,value)
else table.insert(result,'null') end
end
for key,value in pairs(lua_table) do
if not done[key] then
only_indexs = false
if type(value) == 'table' then table.insert(result,'"'..key..'":'..json_log(value,true))
elseif type(value) == 'string' then table.insert(result,'"'..key..'":"'..value..'"')
elseif type(value) == 'number' then table.insert(result,'"'..key..'":'..value)
elseif type(value) == 'number' or type(value) == 'boolean' then table.insert(result,'"'..key..'":'..value)
else table.insert(result,'"'..key..'":null') end
end
end