Hi,

I believe part of the job should be the programmer's job too.
json_encode() is way too useful to pass things to javascript (the other
way around is not that easy, but I have a function called "JSparse"
which work nicely with .toSource() output, and an implementation
of .toSource() for MSIE, I was doing json with that even before json
existed).

I'm in favour of #1.

Lazy mode is "not that good", as it's going to break things anyway by
silently doing magic stuff the final developer didn't expect because it
didn't happen in previous versions.


Mark

Le lundi 15 décembre 2008 à 14:34 -0800, mike a écrit :
> On Mon, Dec 15, 2008 at 1:43 PM, John Carter -X (johncart - PolicyApp
> Ltd at Cisco) <johnc...@cisco.com> wrote:
> > How about a strict mode added to the list of the current json_encode()
> > options?
> >
> > That way current code will continue to work and anyone reading the docs
> > will know the default behaviour isn't strictly correct.
> 
> I'd rather have a "lazy mode" option, so by default it is spitting out
> correct JSON (according to specs)
> 


-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to