lua-users home
lua-l archive

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


On Wed, 2011-10-26 at 17:45 -0400, Matthew Wild wrote:
> On 26 October 2011 15:22, Alexander Gladysh <agladysh@gmail.com> wrote:
> > Hi, list!
> >
> > I need to parse JSON in Lua-only environment.
> >
> > Is there some primitive single-file JSON parser that I can paste
> > directly into my script? (Doh, no multi-file support as well...)
> >
> 
> I thought you'd never ask.
> 
> MIT-licensed (see project root directory, though I can add a copyright
> header if you require that):
> http://hg.prosody.im/trunk/file/tip/util/json.lua
> 
> The decoder starts after line 132.
> 
> Regards,
> Matthew
> 

Shouldn't the * be a / in line 170?
168 			if ch == "/" and peek == "*" then
169 				skipstarcomment();
170 			elseif ch == "/" and peek == "*" then
171 				skiplinecomment();
172 			else

</nk>