Re: JSON inclusion in core
| From: | Rasmus Lerdorf | Date: | Wed, 01 Feb 2006 04:53:50 +0000 |
| Subject: | Re: JSON inclusion in core | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-21750@lists.php.net to get a copy of this message | ||
Paul wrote:
Здравствуйте, internals.You are confused. $_JSON would be for the JSON request mechanism that is being discussed. By definition there can only be 1 JSON body per JSON request, just like there can only be 1 POST body per POST request. -Rasmus"From: Rasmus Lerdorf To: internals@lists.php.net CC: omar@rmilk.com Subject: [PHP-DEV] JSON inclusion in core Date: Fri, 20 Jan 2006 11:31:58 -0800 pecl/json is a rather simple extension with no external deps (it bundles the small library it uses). The JSON format is stable with no real possibility of changing basically by definition, and I see its use exploding this year. There is also talk to a JSON Request object being added to browsers and if that happens we need to support that natively much like we support url-encoded form data ending up directly in $_POST. I could see a $_JSON if browsers start sending this. But, as an initial step how about we bundle pecl/json in the next release?I think super-global array $_JSON is a bad idea, because it allows only single instance. It is not $_GET or $_POST which are always single per request. Also, $_SESSION was bad idea too, when we need 2 separated sessions (for example with different cookie params) - we cant use PHP integrated session solution. So please, do not repeat old mistakes.