Skip to content

Conversation

clang-clang-clang
Copy link
Contributor

Fix #482, tested with following demo:

local json = require("json")
local t = { k1 = 123, k2 = false, k3 = false, k4 = '456' }
local str = json.encode( t, { keyorder = {'k2', 'k1', 'k3', 'k4'} })
print( str )

-- before:  {"k1":123,"k4":"456","k3":false,"k2":false}
-- after:   {"k2":false,"k1":123,"k3":false,"k4":"456"}

@Shchvova Shchvova merged commit 798bda0 into coronalabs:master Oct 10, 2023
@clang-clang-clang clang-clang-clang deleted the fix-json-keyorder branch October 11, 2023 01:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants