Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:33587 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 65579 invoked by uid 1010); 3 Dec 2007 17:30:22 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 65563 invoked from network); 3 Dec 2007 17:30:22 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 3 Dec 2007 17:30:22 -0000 Authentication-Results: pb1.pair.com smtp.mail=rasmus@lerdorf.com; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=rasmus@lerdorf.com; sender-id=unknown Received-SPF: error (pb1.pair.com: domain lerdorf.com from 204.11.219.139 cause and error) X-PHP-List-Original-Sender: rasmus@lerdorf.com X-Host-Fingerprint: 204.11.219.139 mail.lerdorf.com Received: from [204.11.219.139] ([204.11.219.139:37997] helo=mail.lerdorf.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id CE/4B-25012-B2D34574 for ; Mon, 03 Dec 2007 12:30:20 -0500 Received: from trainburn-lm-corp-yahoo-com.local (c-24-6-228-50.hsd1.ca.comcast.net [24.6.228.50]) (authenticated bits=0) by mail.lerdorf.com (8.14.2/8.14.2/Debian-1) with ESMTP id lB3HU3Hw025067 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Mon, 3 Dec 2007 09:30:13 -0800 Message-ID: <47543D1A.9090503@lerdorf.com> Date: Mon, 03 Dec 2007 09:30:02 -0800 User-Agent: Thunderbird 2.0.0.9 (Macintosh/20071031) MIME-Version: 1.0 To: Alexey Zakhlestin CC: PHP Internals References: <474F0EE7.8020201@php.net> <474F4E47.8050506@zend.com> <474F5E12.1050404@php.net> <474F5F75.3030808@zend.com> <475081DD.90404@php.net> <4750B3CA.20405@zend.com> <475101FF.5080103@lerdorf.com> <4752130C.701@lerdorf.com> In-Reply-To: X-Enigmail-Version: 0.95.5 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV 0.91.2/4983/Mon Dec 3 07:57:26 2007 on colo.lerdorf.com X-Virus-Status: Clean Subject: Re: [PHP-DEV] Proposed feature for json_encode() From: rasmus@lerdorf.com (Rasmus Lerdorf) Alexey Zakhlestin wrote: > On 12/2/07, Rasmus Lerdorf wrote: >> The \u syntax is specific to JSON, yes. > > \u syntax is specific to javascripts string literals, regular > expressions and identifiers[1] > And JSON is not the only way to deliver data into javascript. Manual > approaches are still useful Since JSON and Javascript are synonymous, sure, \u is for javascript string literals. I thought you meant whether it was useful outside of Javascript. And I disagree with your second statement. Why wouldn't you use json anytime you wanted to jump from PHP to Javascript? That ensures that no matter what $a is on the PHP side, it will be correctly assigned to the corresponding Javascript variable. -Rasmus