lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

On Sun, May 1, 2011 at 6:26 PM, Alexander Gladysh <> wrote:
> On Mon, May 2, 2011 at 02:16, Alexander Gladysh <> wrote:
>> On rather small JSON data (will prepare a minimal sample ASAP) we get
>> this error from luajson[1] 1.2.1:
>> /luajson/lua/json/decode.lua:90: too many pending calls/choices
> Here is the data that triggers the crash:
> Steps to reproduce (involving json2lua for ease of use):
> curl
> sudo luarocks install json2lua
> $ json2lua <bad.json
> luajit2: /usr/local/share/lua/5.1//json/decode.lua:90: too many
> pending calls/choices
> stack traceback:
>        [C]: in function 'match'
>        /usr/local/share/lua/5.1//json/decode.lua:90: in function 'json_decode'
>        (command line):79: in main chunk
>        [C]: ?
> json2lua is quite unsophisticated, and should not affect the outcome:
Good catch, I've found this is indeed a nasty little problem through
many of my versions released. I'll need to figure out some way to
linearize the parsing somehow.
It appears the maximum depth LuaJSON can handle right now is ~24
levels deep, even with trivial objects.

Thomas Harning Jr.
Support my wife, Jenn, as she runs her first 10k, donations
appreciated... every dollar helps!