[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: luajson (or lpeg) issue
- From: "Thomas Harning Jr." <harningt@...>
- Date: Mon, 2 May 2011 22:02:57 -0400
On Sun, May 1, 2011 at 6:26 PM, Alexander Gladysh <email@example.com> wrote:
> On Mon, May 2, 2011 at 02:16, Alexander Gladysh <firstname.lastname@example.org> wrote:
>> On rather small JSON data (will prepare a minimal sample ASAP) we get
>> this error from luajson 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 https://gist.github.com/raw/950942/f9ef959e46512793e7273a060bc58b04b567ea16/bad.json
> 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!