lua-users home
lua-l archive

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

On Thu, Sep 9, 2010 at 7:42 PM, Jonathan Castello <> wrote:
> On Thu, Sep 9, 2010 at 11:33 AM, David Kolf <> wrote:
>> In my implementation empty tables are encoded as JSON arrays. As far as
>> I understood, a JavaScript array is an object with added functionality
>> (length and so on) so I thought that accidentally creating an array
>> instead of an object shouldn't hurt in JavaScript code while the other
>> case could hurt if functionality is missing for an array.
> I prefer to look at them as completely different types, because JSON
> is supposed to be more or less language-neutral (regardless of where
> it came from).

I concur, you should not assume that the endpoint of a JSON document
is going to be JavaScript.