Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:86364 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 21066 invoked from network); 24 May 2015 16:02:21 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 24 May 2015 16:02:21 -0000 Authentication-Results: pb1.pair.com header.from=jakub.php@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=jakub.php@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.213.171 as permitted sender) X-PHP-List-Original-Sender: jakub.php@gmail.com X-Host-Fingerprint: 209.85.213.171 mail-ig0-f171.google.com Received: from [209.85.213.171] ([209.85.213.171:37916] helo=mail-ig0-f171.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 77/F0-08079-B06F1655 for ; Sun, 24 May 2015 12:02:19 -0400 Received: by igcau1 with SMTP id au1so19991743igc.1 for ; Sun, 24 May 2015 09:02:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:date:message-id:subject:from:to:content-type; bh=ccuB3pvnBVLkMS9I3+geZ6db/sMQUYfW34f7bKzIx7E=; b=r0zsWjZcJmEq8DDr9hFkTQQvwKghUdRcHAz+eaCQHLANGaAzFSuPVEs+nPEyCJip6J 4fftsGc+8gAZ++XbnUWV788+gWn2nsNz4hWuQJEGFi4ZGriNeJBprrk4bLxIF6Gv7mGz 1H45+2t92arF1ygECqPn4fIxg0z8Ttg12qsMmffCZlYo0+b/pcK4DZOEh017RgRnWD+G HOswNcTt2XAYAYYNS1Tv0wfszIa1/b6hIvanWdeAoJjHYwJxgmHsj+2rlvrLM0MkVmOx bPtq29AbWcNbWTssphFkL0yYO3RZGc0Dp0ykJIx9rdgA3dmo1SiMb/dzbF0i0haV6CSy g/AA== MIME-Version: 1.0 X-Received: by 10.107.46.39 with SMTP id i39mr23478806ioo.8.1432483336448; Sun, 24 May 2015 09:02:16 -0700 (PDT) Sender: jakub.php@gmail.com Received: by 10.107.153.74 with HTTP; Sun, 24 May 2015 09:02:16 -0700 (PDT) Date: Sun, 24 May 2015 17:02:16 +0100 X-Google-Sender-Auth: cnW_Og2JopDa3sMMZIFXCLXzDaE Message-ID: To: PHP internals list Content-Type: multipart/alternative; boundary=001a1137805e6a72380516d6042a Subject: [RFC] JSON number to string From: bukka@php.net (Jakub Zelenka) --001a1137805e6a72380516d6042a Content-Type: text/plain; charset=UTF-8 Hi, I would like to introduce my and Pasindu's RFC that proposes adding of new JSON options for converting number values to string when decoding and/or encoding: https://wiki.php.net/rfc/json_numeric_as_string Personally I'm not a big fun of these options because of their drawbacks (see RFC section about that) and because I think that Json Scheme is a better way to go. However I'm not sure when and if I have time for Json Schema implementation, so this could be useful for some users the meantime. That is especially case of JSON_FLOAT_TO_STRING for decoding (encoding is a bit weird at it requires usage ini precision to do something useful). That (decoding) seems like a sort of a variant of JSON_BIGINT_TO_STRING for floats. That will be probably the only option that I will be vote for. Cheers Jakub --001a1137805e6a72380516d6042a--