fix(json): set `null` values to `nil`

This commit is contained in:
Folke Lemaitre 2023-09-29 11:09:43 +02:00
parent 2609dee882
commit 2f131d0e7d
No known key found for this signature in database
GPG Key ID: 41F8B1FBACAE2040
1 changed files with 1 additions and 6 deletions

View File

@ -62,12 +62,7 @@ function json.isObject(t)
return next(t) ~= nil or getmetatable(t) == objectMt
end
if debug and debug.upvalueid then
-- Generate a lightuserdata
json.null = debug.upvalueid(json.createEmptyObject, 1)
else
json.null = function() end
end
json.null = nil
-- json.encode --
local statusVisited