Serializer: Extra Handling, weil Ganzzahlen von tostring() doch manchmal als Kommazahl zurueckgegeben werden
This commit is contained in:
parent
ff10b787ec
commit
108958c553
@ -45,8 +45,10 @@ function serialize(value, forbidden)
|
|||||||
end
|
end
|
||||||
forbidden[value]=false
|
forbidden[value]=false
|
||||||
return "{"..r.."}"
|
return "{"..r.."}"
|
||||||
elseif t=="number" or t=="boolean" then
|
elseif t=="boolean" then
|
||||||
return tostring(value)
|
return tostring(value)
|
||||||
|
elseif t=="number" then
|
||||||
|
return tostring(math.tointeger(value) or value)
|
||||||
elseif t=="string" then
|
elseif t=="string" then
|
||||||
return string.format("%q",value)
|
return string.format("%q",value)
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user