[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: RE: Proposal: Lua Table Notation + load change
- From: Julien Duminil <julien.duminil@...>
- Date: Fri, 29 Jun 2012 10:39:57 +0200
> Hi Julien,
Hi Paul,
> I don't think JSON is a good example as it is too limited for what Lua data structures can handle.
> JSON doesn't handle shared or circular references, can not handle tables with keys of various types, and doesn't even allow to distinguish between 1.5 and '1.5' as a key as all the keys are strings (http://tools.ietf.org/html/rfc4627).
> Somebody described it as a data-exchange, rather than a serialization language, which I agree with.
"distinguish between 1.5 and '1.5' as a key" is, IMO, one example of the advantage to have a Lua replacement for JSON.
> If you need something more powerful than JSON, then why don't just use the data structures that Lua already provides?
It's what I do, I don't use JSON, I use Lua or XML to store data :)
But Lua "data" is too powerful to be read by another language if you use functions, table as keys or circular references.
(That's the reason of the first proposal.)
Julien