kernelsauce / turbo

Turbo is a framework built for LuaJIT 2 to simplify the task of building fast and scalable network applications. It uses a event-driven, non-blocking, no thread design to deliver excellent performance and minimal footprint to high-load applications while also providing excellent support for embedded uses.
http://turbo.readthedocs.io/
Apache License 2.0
525 stars 84 forks source link

Update 3rd Party JSON.lua #335

Closed smb closed 3 years ago

smb commented 6 years ago

Please consider updating the JSON.lua to 20170927.26 (http://regex.info/blog/lua/json) since there are some major issues in your version.

For example if you pass an JSON Array:

a: [ "one", "two", null, "three" ]

the builtin get_json from WebRequest parses as:

a: [ "one", "two", "three" ]

which can cause issues if you are using number based arrays.

My only viable workaround is to replace JSON.lua in my installation which isnt that nice. Reading the HTTP body manually + call my own JSON.lua might work but I can't think this should be needed.

thank you.