json5 work

This commit is contained in:
Joe 2026-01-22 22:19:00 -06:00
parent cd63b5c9c0
commit fdd1d145cf
22 changed files with 1977 additions and 90 deletions

View file

@ -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