KSDaemon / wiola

WAMP implementation in Lua
http://ksdaemon.github.io/wiola
BSD 2-Clause "Simplified" License
70 stars 12 forks source link

Replace lua-rapidjson with lua-cjson #9

Closed mckaydavis closed 6 years ago

mckaydavis commented 7 years ago

I propose replacing the lua-rapidjson package dependency with lua-cjson.

Rationale:

Thoughts?

KSDaemon commented 7 years ago

Hi @mckaydavis (again :) ) Well, in the begining i was using cjson, but than i had switched to rapidjson due to lack of support of empty arrays. In cjson you can globaly configure to encode lua empty tables as objects or as arrays. But wiola needs to encode different empty tables differently. I've got a look into open resty fork, and it has a empty_array and empty_array_mt things, which is good replacement for rapidjson setmetatable({}, { __jsontype = 'object' }) Will be great, if you can make a PR with that ;)

KSDaemon commented 6 years ago

And another one reason for using rapidjson — *cjson lacks support for big integers (> 32 bit)