forked from SilverIce/JContainers
-
Notifications
You must be signed in to change notification settings - Fork 25
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Hi.
I want to propose a change to the implementation of JMap.objectWithTable in jc.lua.
Current implementation only changes the Lua table at a superficial level, thus not converting nested Lua tables to JMap.
I did this and seems to work quite fine:
function JMap.objectWithTable(t)
local object = JMap.object()
for k,v in pairs(t) do
if type(v) == "table" then
object[k] = JMap.objectWithTable(v)
else
object[k] = v
end
end
return object
endNothing too fancy, as you can see. Only a recursive call to deep converting the table.
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request