Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:53022 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 61714 invoked from network); 6 Jun 2011 13:48:43 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 6 Jun 2011 13:48:43 -0000 Authentication-Results: pb1.pair.com smtp.mail=sean@seancoates.com; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=sean@seancoates.com; sender-id=unknown Received-SPF: error (pb1.pair.com: domain seancoates.com from 64.15.79.181 cause and error) X-PHP-List-Original-Sender: sean@seancoates.com X-Host-Fingerprint: 64.15.79.181 iconoclast.caedmon.net Received: from [64.15.79.181] ([64.15.79.181:47576] helo=iconoclast.caedmon.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 2D/97-17923-9BADCED4 for ; Mon, 06 Jun 2011 09:48:42 -0400 Received: from localhost (localhost [127.0.0.1]) by iconoclast.caedmon.net (Postfix) with ESMTP id CB35878404F; Mon, 6 Jun 2011 09:49:44 -0400 (EDT) X-Virus-Scanned: Debian amavisd-new at iconoclast.caedmon.net Received: from iconoclast.caedmon.net ([127.0.0.1]) by localhost (iconoclast.caedmon.net [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id kfRWUFIRWhgJ; Mon, 6 Jun 2011 09:49:43 -0400 (EDT) Received: from [10.0.1.13] (cpe-72-227-135-34.nyc.res.rr.com [72.227.135.34]) by iconoclast.caedmon.net (Postfix) with ESMTPSA id 9B757784043; Mon, 6 Jun 2011 09:49:42 -0400 (EDT) Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=windows-1252 X-Priority: 3 (Normal) In-Reply-To: <1181529113.20110605190617@cypressintegrated.com> Date: Mon, 6 Jun 2011 09:48:36 -0400 Cc: PHP internals Content-Transfer-Encoding: quoted-printable Message-ID: References: <1181529113.20110605190617@cypressintegrated.com> To: Sanford Whiteman X-Mailer: Apple Mail (2.1084) Subject: Re: [PHP-DEV] Object and Array Literals From: sean@seancoates.com (Sean Coates) re "JSON" > =B7 will never validate as JSON >=20 > =B7 recognizably violates JSON quoting rules > =B7 recognizably violates the JSON security concept=85 =85 > -- I do not feel that the acronym JSON has any clarifying nor edifying > place in the RFC describing this syntax. > I have actually been excited about the discussion of this feature area > and anticipate my eventual +1 if "JSON" could be removed from the RFC. > Even though the term doesn't affect the way the feature works, by > upvoting the RFC one is approving of wording that may make it to the > general public, and I think this would be bad for PHP. I was careful in the RFC to indicate that this is *not* JSON, but if = others feel as strongly as you do about the use of this term, I think it = can be removed without hurting the idea (as you indicated). You're right that the RFC does not declare a syntax that will always = validate as JSON, nor does it respect serialization rules, but I see it = more as a declaration syntax than a serialization format, as it is = proposed. The real goal is to improve interaction with third parties, = which I think the proposed syntax would allow. That said, other than the \u syntax, I believe that the proposed = declaration syntax would still allow JSON from a third party to me = interpreted by PHP, in a way that makes sense in PHP. > Somewhat on a side note, I do not understand the statement that >=20 > "using a strict syntax would not conform with the PHP way" >=20 > or at least how it relates to this RFC. This is directly related to the JSON-non-strictness that everyone seems = to want (me included). For example the following is completely invalid = in JSON, but normally OK (for small values of OK) in PHP: (not-)JSON: {foo: 1} (not-)JSON: {'foo': 1} PHP: array(foo =3D> 1) PHP: array('foo' =3D> 1) (For anyone who doesn't follow, correct way in JSON is to use " not '.) Thanks for the comments. S=