Re: creating a table from a file
[
Date Prev][
Date Next][
Thread Prev][
Thread Next]
[
Date Index]
[
Thread Index]
- Subject: Re: creating a table from a file
- From: Peter Melnichenko <petjamelnik@...>
- Date: 2014年1月27日 13:01:20 +0400
On Mon, Jan 27, 2014 at 12:04 AM, Dirk Laurie <dirk.laurie@gmail.com> wrote:
> 2. If the input is not trustworthy, you can say
> safe={}
> t = assert( loadstring("return {"..s.."}",nil,nil,safe) )()
This isn't going to work. The string is just a list of assignments, there are no separators between key-value pairs, so "{"..s.."}" is not a correct table literal.
Peter