incubator-callback-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brian LeRoux...@brian.io>
Subject Re: [DISCUSS] using JSON.parse to parse messages from native
Date Sat, 02 Jun 2012 01:17:05 GMT
Should def use JSON.parse ...tho generally no religious exceptions to eval
or cousins like new Function. Super handy constructs for some purposes like
dynamic function generation. Used  em a lot in Lawnchair.

On Friday, June 1, 2012, Patrick Mueller wrote:

> On Fri, Jun 1, 2012 at 8:19 PM, Jesse <purplecabbage@gmail.com<javascript:;>>
> wrote:
>
> > If JSON.parse is available then definitely use it!
> >
>
> JSON.parse is always available, worse case is adding it yourself:
>
>    https://github.com/douglascrockford/JSON-js/blob/master/json2.js
>
> (note, this doesn't even have Crock's "do not use for evil" clause!  (I
> think the Java version does though))
>
> Unless there is a size/speed issue with using this code, if you don't have
> JSON built in, please use it - or something equivalent.
>
> I guess I'm curious to see if folks have been dependent on eval() for other
> reasons.
>
> --
> Patrick Mueller
> http://muellerware.org
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message