function Val2Str(value)
local value_cach = {}
local tinsert = table.insert
local tconcat = table.concat
local sformat = string.format
local sgsub = string.gsub
function _Val2Str(value, prefix)
local str = ""
local tbList = {}
local oldprefix = prefix or ""
prefix = oldprefix.." "
local value_type = type(value)
if value_type == "table" then
local value_name = tostring(value)
if value_cach[value] then
return sformat("\"%s\" , -- loop table", value_name)
end
value_cach[value] = 1
tinsert(tbList, sformat("%s--%s", '{', value_name))
for k, v in pairs(value) do
local temp = _Val2Str(v, prefix)
local key
if type(k) == "number" then
key = sformat("[%s]", k)
else
key =...