mirror of
https://github.com/rojo-rbx/rojo.git
synced 2026-10-23 14:01:37 +00:00
json5 work
This commit is contained in:
parent
cd63b5c9c0
commit
fdd1d145cf
22 changed files with 1977 additions and 90 deletions
|
|
@ -11,12 +11,7 @@ local function unpackDecoder(f)
|
|||
end
|
||||
|
||||
local function serializeFloat(value)
|
||||
-- TODO: Figure out a better way to serialize infinity and NaN, neither of
|
||||
-- which fit into JSON.
|
||||
if value == math.huge or value == -math.huge then
|
||||
return 999999999 * math.sign(value)
|
||||
end
|
||||
|
||||
-- JSON5 supports Infinity and NaN natively
|
||||
return value
|
||||
end
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue