[Proto-Scripty] Re: Detecting an empty [] as a parameter to a function.

2009-03-19 Thread Richard Quadling
2009/3/18 Richard Quadling : > 2009/2/25 SWilk : >> >> kangax wrote: >>> On Feb 25, 3:27 am, SWilk wrote: >>> [...] It's not that Richard does want to use it. It's that the PHP json_encode() function produces inconsistent output for empty arrays. If you do json_encode(arr

[Proto-Scripty] Re: Detecting an empty [] as a parameter to a function.

2009-03-18 Thread Richard Quadling
2009/2/25 SWilk : > > kangax wrote: >> On Feb 25, 3:27 am, SWilk wrote: >> [...] >>> It's not that Richard does want to use it. It's that the PHP >>> json_encode() function produces inconsistent output for empty arrays. >>> >>> If you do >>> json_encode(array('key' => 'value'); >>> you will get:

[Proto-Scripty] Re: Detecting an empty [] as a parameter to a function.

2009-02-25 Thread SWilk
kangax wrote: > On Feb 25, 3:27 am, SWilk wrote: > [...] >> It's not that Richard does want to use it. It's that the PHP >> json_encode() function produces inconsistent output for empty arrays. >> >> If you do >> json_encode(array('key' => 'value'); >> you will get: >> { key: value }; > > And I

[Proto-Scripty] Re: Detecting an empty [] as a parameter to a function.

2009-02-25 Thread kangax
On Feb 25, 3:27 am, SWilk wrote: [...] > It's not that Richard does want to use it. It's that the PHP > json_encode() function produces inconsistent output for empty arrays. > > If you do > json_encode(array('key' => 'value'); > you will get: > { key: value }; And I assume that `json_encode(arra

[Proto-Scripty] Re: Detecting an empty [] as a parameter to a function.

2009-02-25 Thread Richard Quadling
2009/2/25 SWilk : > > kangax wrote: >> On Feb 24, 8:43 am, Richard Quadling wrote: >>> Hi. >>> >>> I'm using JSONP to pass data from the server to the client. >>> >>> Normally the call is like ... >>> >>> tabRA_UpdateReportIDs({"13":"Richard Quadling's demo report (Richard's >>> complicated repor

[Proto-Scripty] Re: Detecting an empty [] as a parameter to a function.

2009-02-25 Thread SWilk
kangax wrote: > On Feb 24, 8:43 am, Richard Quadling wrote: >> Hi. >> >> I'm using JSONP to pass data from the server to the client. >> >> Normally the call is like ... >> >> tabRA_UpdateReportIDs({"13":"Richard Quadling's demo report (Richard's >> complicated report)"}); >> >> A hash. >> >> In s

[Proto-Scripty] Re: Detecting an empty [] as a parameter to a function.

2009-02-25 Thread Manfred Knops
Guten Morgen Thomas, hab da was fuer Dich. Ist fuer Dich bestimmt von Interesse. http://www.heise.de/newsticker/Webbrowser-ohne-Installation-testen--/meldung/133454 MfG Manfred --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Goog

[Proto-Scripty] Re: Detecting an empty [] as a parameter to a function.

2009-02-24 Thread kangax
On Feb 24, 8:43 am, Richard Quadling wrote: > Hi. > > I'm using JSONP to pass data from the server to the client. > > Normally the call is like ... > > tabRA_UpdateReportIDs({"13":"Richard Quadling's demo report (Richard's > complicated report)"}); > > A hash. > > In some instances, there is no d

[Proto-Scripty] Re: Detecting an empty [] as a parameter to a function.

2009-02-24 Thread david
Hi richard, very interresting ... and I do some test to understand results. first, prototype method to create the Hash rely on the for..in loop. So what is the result using the for in loop to retrieve all properties: I does this: var _o={}; var _a=[]; console.log(