We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hi. I want to propose a change to the implementation of JMap.objectWithTable in jc.lua.
JMap.objectWithTable
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 end
Nothing too fancy, as you can see. Only a recursive call to deep converting the table.
The text was updated successfully, but these errors were encountered:
Is this still a valid request? I'm reluctant to change existing functions behaviour. A new one might be better idea.
Sorry, something went wrong.
Yeah. It still is.
I used it quite A LOT in real "production" code and always worked reliably as expected.
Maybe a new function is a good idea, but still, I know the code works.
No branches or pull requests
Hi.
I want to propose a change to the implementation of
JMap.objectWithTable
injc.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:
Nothing too fancy, as you can see. Only a recursive call to deep converting the table.
The text was updated successfully, but these errors were encountered: