Skip to content

consider number type in the flatten function #14

New issue

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

Open
tokers opened this issue Feb 13, 2019 · 1 comment
Open

consider number type in the flatten function #14

tokers opened this issue Feb 13, 2019 · 1 comment

Comments

@tokers
Copy link

tokers commented Feb 13, 2019

Hi, Thibault!

Thanks for your job! This Lua module is very useful.

I'm trying to cooperate this Lua module with lua-resty-redis, so that we can communicate with our Redis servers in these "non-yield" phases.

I find the internal function flatten doesn't handle the number type. In lua-resty-redis, parameters passed to sock:send might be a Lua table with kinds of data type like string, number. Even in the implementations of luasocket, it uses luaL_checklstring, which also can convert number to string.

So maybe we should consider the number type. What's your opinion?

@tokers tokers changed the title flatten data with tostring consider number type in the flatten function Feb 13, 2019
@thibaultcha
Copy link
Owner

Hey there! Sorry I missed this... Yes, definitly, if you still are using this library, please feel free to send a PR!

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

No branches or pull requests

2 participants