Skip to content
This repository has been archived by the owner on Nov 20, 2020. It is now read-only.

Fix bug with keyorder when value is false #3

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion dkjson.lua
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,7 @@ encode2 = function (value, indent, level, buffer, buflen, tables, globalorder, s
for i = 1, n do
local k = order[i]
local v = value[k]
if v then
if v ~= nil then
used[k] = true
buflen, msg = addpair (k, v, prev, indent, level, buffer, buflen, tables, globalorder, state)
prev = true -- add a seperator before the next element
Expand Down