[Json] on serialization of signed zero

Sonny Piers <sonny@fastmail.net> Sun, 05 July 2015 17:45 UTC

Return-Path: <sonny@fastmail.net>
X-Original-To: json@ietfa.amsl.com
Delivered-To: json@ietfa.amsl.com
Received: from localhost (ietfa.amsl.com [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 028811A8957 for <json@ietfa.amsl.com>; Sun, 5 Jul 2015 10:45:17 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: 0.001
X-Spam-Level:
X-Spam-Status: No, score=0.001 tagged_above=-999 required=5 tests=[BAYES_50=0.8, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-0.7, SPF_PASS=-0.001] autolearn=ham
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id c0CiKp0Ri4Bl for <json@ietfa.amsl.com>; Sun, 5 Jul 2015 10:45:15 -0700 (PDT)
Received: from out5-smtp.messagingengine.com (out5-smtp.messagingengine.com [66.111.4.29]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 766231A8900 for <json@ietf.org>; Sun, 5 Jul 2015 10:45:15 -0700 (PDT)
Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id AD29F2060B for <json@ietf.org>; Sun, 5 Jul 2015 13:45:14 -0400 (EDT)
Received: from frontend1 ([10.202.2.160]) by compute5.internal (MEProxy); Sun, 05 Jul 2015 13:45:14 -0400
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=fastmail.net; h= content-type:date:from:message-id:mime-version:subject:to :x-sasl-enc:x-sasl-enc; s=mesmtp; bh=QdIaz47VEd0fvhm67E+2Nih7ccg =; b=GsyN4kUC7I3yFpSBqLhcMABv6azJ/ucOXupnPcQe/DS2DhTR+XDhOvA7UCW yK6WDxFr0eCpQox5QXLtLtnn9yEUJEO2XnQGlM+FPKdPaN/S27sHCT0WxGes/4oJ Zp1TrDUNQ47sdhE3XvwpfQmkbcNCQBLak45hbeg5ZJb5vJXg=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=content-type:date:from:message-id :mime-version:subject:to:x-sasl-enc:x-sasl-enc; s=smtpout; bh=Qd Iaz47VEd0fvhm67E+2Nih7ccg=; b=g2XWUFSO2RBYTpPSB544orHzJyMkz5iyBw PTxuLp8yC+3wGZ1dzVgIv/8tWqvD2KHsdfIAhCr2cVkNGXWz7DPWM5JtdkJwm0eV nczw31kyXVLKj0YoLjkF+Z3x+pl6bGjghXDP0hvSMOfxUTm+OJ5tMtY1I26dwVQl /VRCjsHxw=
X-Sasl-enc: bVwDGdO/eaplNCt4lQtZk8Wq0M/BS6+VWlB+4scT0WYg 1436118314
Received: from sonny-laptop.local (teleyecla-101-230-100-176.cpes.teleyecla.net [176.100.230.101]) by mail.messagingengine.com (Postfix) with ESMTPA id 38BD4C0028C for <json@ietf.org>; Sun, 5 Jul 2015 13:45:14 -0400 (EDT)
Message-ID: <55996D2C.8050907@fastmail.net>
Date: Sun, 05 Jul 2015 19:45:16 +0200
From: Sonny Piers <sonny@fastmail.net>
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:31.0) Gecko/20100101 Thunderbird/31.7.0
MIME-Version: 1.0
To: json@ietf.org
Content-Type: multipart/alternative; boundary="------------080903020409090403000102"
Archived-At: <http://mailarchive.ietf.org/arch/msg/json/35v08qpRbhc5nIJrsTEkA0QWzhA>
Subject: [Json] on serialization of signed zero
X-BeenThere: json@ietf.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: "JavaScript Object Notation \(JSON\) WG mailing list" <json.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/json>, <mailto:json-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/json/>
List-Post: <mailto:json@ietf.org>
List-Help: <mailto:json-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/json>, <mailto:json-request@ietf.org?subject=subscribe>
X-List-Received-Date: Sun, 05 Jul 2015 17:52:21 -0000

Hello,

Signed zeros are included in the IEEE floating point standard.
 From my understanding RFC 7159 doesn't forbid them.
But both python and ECMAScript serialize signed zeros (-0) into "0".

I wonder what would be the correct way of serializing them.

Thanks.