mirror of
https://github.com/PHIDIAS0303/ExpCluster.git
synced 2025-12-31 13:01:39 +09:00
Fixed json again
This commit is contained in:
@@ -73,7 +73,7 @@ function json_log(table,no_log)
|
|||||||
for key,value in ipairs(table) do
|
for key,value in ipairs(table) do
|
||||||
done[key] = true
|
done[key] = true
|
||||||
if type(value) == 'table' then value = table.insert(result,json_log(value,true)) end
|
if type(value) == 'table' then value = table.insert(result,json_log(value,true)) end
|
||||||
if type(value) == 'string' then json = table.insert(result,key..':""'..value..'"') end
|
if type(value) == 'string' then json = table.insert(result,key..':""'..value..'"')
|
||||||
elseif type(value) == 'number' then table.insert(result,key..':'..value)
|
elseif type(value) == 'number' then table.insert(result,key..':'..value)
|
||||||
else table.insert(result,key..':null') end
|
else table.insert(result,key..':null') end
|
||||||
end
|
end
|
||||||
@@ -81,7 +81,7 @@ function json_log(table,no_log)
|
|||||||
if not done[key] then
|
if not done[key] then
|
||||||
only_indexs = false
|
only_indexs = false
|
||||||
if type(value) == 'table' then table.insert(result,json_log(value,true)) end
|
if type(value) == 'table' then table.insert(result,json_log(value,true)) end
|
||||||
if type(value) == 'string' then table.insert(result,key..':"'..value..'"') end
|
if type(value) == 'string' then table.insert(result,key..':"'..value..'"')
|
||||||
elseif type(value) == 'number' then table.insert(result,key..':'..value)
|
elseif type(value) == 'number' then table.insert(result,key..':'..value)
|
||||||
else table.insert(result,key..':null') end
|
else table.insert(result,key..':null') end
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user