587Re: [json] Re: json.js breaks for-in loops
- Nov 13, 2006On 11/13/06, Stephen M. McKamey <jsonml@...> wrote:
>Sure - if the for loop is in your own code, and not some other package that
> --- In email@example.com, Tom Metro <tmetro+json@...> wrote:
> > Peter Michaux wrote:
> > > By extending the Object.prototype with the new property
> toJSONString I
> > As another poster mentioned, using hasOwnProperty(), is the way to
> > the intended behavior work. My understanding is that hasOwnProperty()
> > isn't widely supported yet.
> A little late to the conversation but... another alternative could be
> to use the typeof operator (assuming one was iterating over data):
> for(k in obj)
> if("function"!=typeof obj[k])
you're just trying to make use of.
This issue really needs to be fixed in the JSON code, since there's no way
you can rely on it being fixed in all the other code out there that you
might want to use.
> smm[Non-text portions of this message have been removed]
> Yahoo! Groups Links
- << Previous post in topic Next post in topic >>