Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:86545 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 99941 invoked from network); 10 Jun 2015 11:01:26 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 10 Jun 2015 11:01:26 -0000 Authentication-Results: pb1.pair.com smtp.mail=yohgaki@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=yohgaki@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.213.41 as permitted sender) X-PHP-List-Original-Sender: yohgaki@gmail.com X-Host-Fingerprint: 209.85.213.41 mail-yh0-f41.google.com Received: from [209.85.213.41] ([209.85.213.41:35219] helo=mail-yh0-f41.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 76/D6-61871-50918755 for ; Wed, 10 Jun 2015 07:01:26 -0400 Received: by yhak3 with SMTP id k3so18760324yha.2 for ; Wed, 10 Jun 2015 04:01:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-type; bh=9izVb4twdWBOtdHY0Ijj0opN01pnAQatfjQZa1Cngxs=; b=IKF9Ndg/8GsyA+tFXUXvCM5HUYMnmFx0f7lgOO0/Iu0QIb/q37YpNDM6R/E89av0q0 JxOP4+kpEVkZKHP0c0ToJRg08gltKaTGg/rz9G25RPAnNMjgbvXVvLSmUXnz6MgVI7r6 uyoh0uRcdcQ07nk6FFmgihtOubvUYdsVjEOJYCEiHHV2L8vpNGDsSzlaIamfNxwaUYWn yvFAddcsmKH7wLWG8azB15vr7iO5BHKupvKx+ws2EdlsOjgsuupYFlczFRiWXflZKSCy q8eLzix30FVmcB7/AwhM4mcMCl6UjZSCaFPu5mNIp3o3sVuJQFGgvwOynu0OMr9QCb0I ugcA== X-Received: by 10.129.98.132 with SMTP id w126mr3030655ywb.32.1433934083729; Wed, 10 Jun 2015 04:01:23 -0700 (PDT) MIME-Version: 1.0 Sender: yohgaki@gmail.com Received: by 10.13.246.2 with HTTP; Wed, 10 Jun 2015 04:00:43 -0700 (PDT) In-Reply-To: References: Date: Wed, 10 Jun 2015 20:00:43 +0900 X-Google-Sender-Auth: hHEtPWZ0SZB3nBI36uVUrJhlcno Message-ID: To: Derick Rethans Cc: Jakub Zelenka , PHP internals list Content-Type: multipart/alternative; boundary=001a1146c7f2b13175051827cb7d Subject: Re: [PHP-DEV] [VOTE] JSON number to string From: yohgaki@ohgaki.net (Yasuo Ohgaki) --001a1146c7f2b13175051827cb7d Content-Type: text/plain; charset=UTF-8 On Wed, Jun 10, 2015 at 7:57 PM, Yasuo Ohgaki wrote: > On Wed, Jun 10, 2015 at 7:28 PM, Derick Rethans wrote: > >> > Hi, >> > >> > The voting is now open: >> > >> > https://wiki.php.net/rfc/json_numeric_as_string#voting >> >> FWIW, I voted no to all of them because (as you even say in the RFC), >> this is probably better be solved with a JSON schema thingy. > > > JSON Schema does not help to decoding/encoding numeric data without > loosing data. > > JSON Schema Core > http://json-schema.org/latest/json-schema-core.html#anchor8 > Note: JSON specification does not specify precision. So number could be > any number. > > JSON Schema Validation > http://json-schema.org/latest/json-schema-validation.html#anchor5 > > Those who do not care rounding errors/etc, they can use default behavior. > JSON Schema could be used to encode huge numbers correctly, so I would like to have it in the future also. -- Yasuo Ohgaki yohgaki@ohgaki.net --001a1146c7f2b13175051827cb7d--