Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:53026 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 70202 invoked from network); 6 Jun 2011 14:23:46 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 6 Jun 2011 14:23:46 -0000 Authentication-Results: pb1.pair.com header.from=dukeofgaming@gmail.com; sender-id=pass; domainkeys=bad Authentication-Results: pb1.pair.com smtp.mail=dukeofgaming@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.213.170 as permitted sender) DomainKey-Status: bad X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 X-PHP-List-Original-Sender: dukeofgaming@gmail.com X-Host-Fingerprint: 209.85.213.170 mail-yx0-f170.google.com Received: from [209.85.213.170] ([209.85.213.170:52457] helo=mail-yx0-f170.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 6F/19-17923-FE2ECED4 for ; Mon, 06 Jun 2011 10:23:44 -0400 Received: by yxn35 with SMTP id 35so1534205yxn.29 for ; Mon, 06 Jun 2011 07:23:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-type; bh=VKTGkLI1I/NG1in44A77TwNStXuD1BbL4kns5iOo4r0=; b=KfAgFW5tT5TY1idVOSZ1TaMJoEO70yC8mHc2WIKZvj76IO8nXjH9gAkTsQRc0YAaTj wJlZFGCmAbXnC3CKmN53q4mGbnIO/PAKXEzw3mR7k2nB6YYqVgMc0CIlh0Zzm3b+vwQ6 Z7WLsihFHIx9WL8Uy7wCTnL5i4aowdGR5R8xM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; b=s0C9ciYcl0x0BG09+9ivCkYCbQcb4KsDZdkPHi4vBwNjVvshxJnVtH/BKLHljz5I/r FdZPXNfD2KUcF/2K129KxpVlt2Kx3Kbr75emNCEEae36x34rYqOt5yNPRKvI3SLSeYyS VaDZWE5G7zFhtO1I/2hQQaqdScipoRT7epGFw= Received: by 10.101.190.12 with SMTP id s12mr3655604anp.146.1307370221129; Mon, 06 Jun 2011 07:23:41 -0700 (PDT) MIME-Version: 1.0 Received: by 10.100.96.15 with HTTP; Mon, 6 Jun 2011 07:23:21 -0700 (PDT) In-Reply-To: References: <1181529113.20110605190617@cypressintegrated.com> Date: Mon, 6 Jun 2011 09:23:21 -0500 Message-ID: To: Sean Coates Cc: Sanford Whiteman , PHP internals Content-Type: multipart/alternative; boundary=0016367ed58e9ed01904a50bd986 Subject: Re: [PHP-DEV] Object and Array Literals From: dukeofgaming@gmail.com (dukeofgaming) --0016367ed58e9ed01904a50bd986 Content-Type: text/plain; charset=ISO-8859-1 On Mon, Jun 6, 2011 at 8:48 AM, Sean Coates wrote: > > 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). > Still, it is mentioned so many times that it could be unintentionally misleading IMHO. > > 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. > Can you provide an use case and code example of how that would look? > > > Somewhat on a side note, I do not understand the statement that > > > > "using a strict syntax would not conform with the PHP way" > > > > 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 => 1) > PHP: array('foo' => 1) > > (For anyone who doesn't follow, correct way in JSON is to use " not '.) > > Thanks for the comments. > As mentioned earlier, I think the resemblance to JSON is just a happy coincidence, the syntax makes enough sense by itself. You can argument that its familiarity/friendliness/ubiquity makes it a good option, but in its current state (i.e. not defining why JSON compatibility is justified) I'd say it is not complete. Regards, David --0016367ed58e9ed01904a50bd986--