Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:42233 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 89912 invoked from network); 13 Dec 2008 17:59:57 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 13 Dec 2008 17:59:57 -0000 Authentication-Results: pb1.pair.com header.from=ilia@prohost.org; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=ilia@prohost.org; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain prohost.org from 74.125.46.31 cause and error) X-PHP-List-Original-Sender: ilia@prohost.org X-Host-Fingerprint: 74.125.46.31 yw-out-2324.google.com Received: from [74.125.46.31] ([74.125.46.31:10866] helo=yw-out-2324.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 0A/F5-47862-B18F3494 for ; Sat, 13 Dec 2008 12:59:56 -0500 Received: by yw-out-2324.google.com with SMTP id 5so936228ywb.83 for ; Sat, 13 Dec 2008 09:59:53 -0800 (PST) Received: by 10.65.133.12 with SMTP id k12mr4244763qbn.65.1229191192931; Sat, 13 Dec 2008 09:59:52 -0800 (PST) Received: from ?192.168.1.111? (CPE0018f8c0ee69-CM000f9f7d6664.cpe.net.cable.rogers.com [72.138.241.182]) by mx.google.com with ESMTPS id 12sm6935891qbw.9.2008.12.13.09.59.50 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sat, 13 Dec 2008 09:59:50 -0800 (PST) Cc: PHP Developers Mailing List Message-ID: To: Scott MacVicar In-Reply-To: <2D85B33E-889B-4214-9BB8-A12EFFFC641E@macvicar.net> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v929.2) Date: Sat, 13 Dec 2008 12:59:49 -0500 References: <2D85B33E-889B-4214-9BB8-A12EFFFC641E@macvicar.net> X-Mailer: Apple Mail (2.929.2) Subject: Re: Removing basic types from our JSON parser From: ilia@prohost.org (Ilia Alshanetsky) On 12-Dec-08, at 10:50 PM, Scott MacVicar wrote: > Hi All, > > Basic types were added to our JSON decoder to PHP 5.2.1, this allows > one to use json_encode / json_decode on any of our scalar types. > Omar correctly identified #38680 as not a bug but it appears that > Ilia added support for this anyway violating the RFC [1]. Maybe > there was a reason for this but I'm not sure why? PHP is typeless language, IMO its conductive to this design to allow encoding of basic types via json_encode, it reduces the code when communicating to/form JavaScript to avoid type detection. While it does violate the RFC IMO the convenience of the feature is definitely worth it. Ilia Alshanetsky