[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: JSON module
- From: Duncan Cross <duncan.cross@...>
- Date: Thu, 9 Sep 2010 19:59:15 +0100
On Thu, Sep 9, 2010 at 7:42 PM, Jonathan Castello <twisolar@gmail.com> wrote:
> On Thu, Sep 9, 2010 at 11:33 AM, David Kolf <kolf@gmx.de> 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.
-Duncan