Newsgroups: php.internals,php.internals Path: news.php.net Xref: news.php.net php.internals:42256 php.internals:42257 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 60040 invoked from network); 14 Dec 2008 17:30:56 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 14 Dec 2008 17:30:56 -0000 X-Host-Fingerprint: 77.240.188.66 unknown Received: from [77.240.188.66] ([77.240.188.66:8156] helo=localhost.localdomain) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 4C/D6-16810-EC245494 for ; Sun, 14 Dec 2008 12:30:55 -0500 To: internals@lists.php.net,Uwe Schindler Message-ID: <49454297.2090505@grudl.com> Date: Sun, 14 Dec 2008 18:29:59 +0100 User-Agent: Thunderbird 2.0.0.18 (Windows/20081105) MIME-Version: 1.0 CC: 'Rasmus Lerdorf' , 'mike' , "'moo.tinys'" , 'Stan Vassilev | FM' , 'PHP Developers Mailing List' References: <2D85B33E-889B-4214-9BB8-A12EFFFC641E@macvicar.net> <1229150500.30719.201.camel@localhost> <4BA26FE8A9634178B4CEBEFA818810D2@VEGA> <15E310EAB433466EAF996B252CBED2BB@pc> <49448D66.2030501@lerdorf.com> <28139bc0812132210p1ed94f4ds40e31ff499cf2e7@mail.gmail.com> <7463F1E1-A880-479F-9584-30FFCED6E614@gmail.com> <4944AA37.9030400@lerdorf.com> <234C8048-A00D-4AEE-A23E-5FA10EA85D6D@gmail.com> <4944AD36.7070406@lerdorf.com> <6C9F85B0-29B8-419C-8DD1-BA90135214D3@gmail.com> <4944C651.1090801@lerdorf.com> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Posted-By: 77.240.188.66 Subject: Re: [PHP-DEV] Removing basic types from our JSON parser From: david@grudl.com (David Grudl) -------- Původní zpráva -------- Předmět: [PHP-DEV] Removing basic types from our JSON parser Od: thetaphi@php.net (Uwe Schindler) Komu: Datum: 14.12.2008 10:40 >> >> >> will always work. The only question is what sort of variable foo will >> end up being. The RFC says we have to wrap basic types in an array or >> object, while currently we let the basic types through without the >> wrapper. > > He problem her eis: A lot of people use in a way and assume, that a basic > type is serialized as a basic type in JSON/JS. If we change this, it could > break a lot of apps. +1 In PHP there is no function for escaping JS strings and json_encode is useful compensation. I use it this way very often. David Grudl