Es4-discuss Digest, Vol 2, Issue 7
Erik Arvidsson
erik.arvidsson at gmail.com
Thu Apr 12 12:31:20 PDT 2007
See earlier thread.
The problem is that allowing people to return a string (override
toJsonString) will very fast lead to invalid JSON. I thought it was
agreed upon that it was better to rely on toJson intead?
On 4/12/07, Douglas Crockford <douglas at crockford.com> wrote:
>
> > > From: "Erik Arvidsson" <erik.arvidsson at gmail.com>
> > I'm starting to see more and more people using
> > Doug's proposal which I
> > thought we all decided was dangerous to use and that
> > we came to the
> > conclusion that toJSONString would only be used at
> > the top level for
> > the serialization (and that it would be read only)
> > and then the
> > serializer would check for toJSON on the objects in
> > the object graph
> > as it serialized it.
>
> I don't understand. What is the danger? Who agreed to what?
> _______________________________________________
> Es4-discuss mailing list
> Es4-discuss at mozilla.org
> https://mail.mozilla.org/listinfo/es4-discuss
>
--
erik
More information about the Es4-discuss
mailing list