Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:80260 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 93049 invoked from network); 8 Jan 2015 00:14:55 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 8 Jan 2015 00:14:55 -0000 Authentication-Results: pb1.pair.com header.from=jrbasso@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=jrbasso@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.216.180 as permitted sender) X-PHP-List-Original-Sender: jrbasso@gmail.com X-Host-Fingerprint: 209.85.216.180 mail-qc0-f180.google.com Received: from [209.85.216.180] ([209.85.216.180:63698] helo=mail-qc0-f180.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id DD/70-22693-DFBCDA45 for ; Wed, 07 Jan 2015 19:14:54 -0500 Received: by mail-qc0-f180.google.com with SMTP id i8so1733980qcq.39 for ; Wed, 07 Jan 2015 16:14:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=t4rFYOhP1J6DyNNfd4jk+W0gJOTSE0jUrVcO9OOjX40=; b=maGftk4UURwaBNm14ulIYXlaQWOnoEa//CM5XRDFfB1rW3gk4iq88iCn1sHGaw1ju7 Qsa91X5XNJqRi9xvO08ZosbO7AyjmcUJfT9l+LNfRCa2DFj9IymtmE7smuVmoxZ/dkCu a0g26oOH01tMQPYrEJpIl5MT98mPvX0ZpXVJ4jSNXuOM8EEZjLGMshpD/X9wI2H6mTDJ rrhkvkmqIMM6p8NYd0WzvBnCqk+Vg5EUwaVh+/O5m8jBnFDAFn3WOmagv26hF9jdk32j WT0JP9ibwYYOe2NSdJ5Q8aIiEMOwv2PO129yecQdBvgMSLXJ3WDFttnlocuXOTYvDi+q CQng== MIME-Version: 1.0 X-Received: by 10.224.120.65 with SMTP id c1mr9879227qar.87.1420676091055; Wed, 07 Jan 2015 16:14:51 -0800 (PST) Received: by 10.140.17.80 with HTTP; Wed, 7 Jan 2015 16:14:50 -0800 (PST) Received: by 10.140.17.80 with HTTP; Wed, 7 Jan 2015 16:14:50 -0800 (PST) In-Reply-To: References: <162491F3-F774-415C-A6B4-EB66D092C1A3@ajf.me> Date: Wed, 7 Jan 2015 22:14:50 -0200 Message-ID: To: Ferenc Kovacs Cc: PHP Internals Content-Type: multipart/alternative; boundary=001a11c2d5d4bfe0ec050c18ed95 Subject: Re: [PHP-DEV] [RFC] Preserve Fractional Part in JSON encode From: jrbasso@gmail.com (Juan Basso) --001a11c2d5d4bfe0ec050c18ed95 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable I really like the new name and the consistence with the rest of php. If no one else has a complain about it I will update the RFC and open for voting, right? Juan Basso On Jan 5, 2015 7:31 AM, "Ferenc Kovacs" wrote: > > > On Mon, Jan 5, 2015 at 5:18 AM, Juan Basso wrote: > >> Hi, >> >> Everyone has any concern on the constant name as Andrea mentioned? Shoul= d >> we keep or rename it? If this name is fine and there is no other concern= s >> probably in 3 days (when completes 2 weeks) this RFC can be moved to >> voting, right? >> >> >> Thanks, >> Juan Basso >> > > I prefer the originally proposed constant name > (JSON_PRESERVE_FRACTIONAL_PART) over JSON_FLOAT_ADD_POINT_ZERO. > I've did a quick check and we have a constant called > FILTER_FLAG_ALLOW_FRACTION so maybe JSON_PRESERVE_FRACTION would be a bit > simpler and consistent. > But that would still imply that without this option we truncate (non-zero= ) > fractional parts, so maybe something like JSON_PRESERVE_ZERO_FRACTION. > I think PRESERVE is better than ADD because we aren't really adding > something but making sure that it won't be lost through the json_encode. > > -- > Ferenc Kov=C3=A1cs > @Tyr43l - http://tyrael.hu > --001a11c2d5d4bfe0ec050c18ed95--