Re: [Json] Schemas & so on

"Joe Hildebrand (jhildebr)" <jhildebr@cisco.com> Tue, 03 May 2016 21:24 UTC

Return-Path: <jhildebr@cisco.com>
X-Original-To: json@ietfa.amsl.com
Delivered-To: json@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 0540E12D92A for <json@ietfa.amsl.com>; Tue, 3 May 2016 14:24:55 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -15.517
X-Spam-Level:
X-Spam-Status: No, score=-15.517 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_HI=-5, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RP_MATCHES_RCVD=-0.996, SPF_PASS=-0.001, USER_IN_DEF_DKIM_WL=-7.5] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=cisco.com
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 bTdnxws1_tC4 for <json@ietfa.amsl.com>; Tue, 3 May 2016 14:24:52 -0700 (PDT)
Received: from rcdn-iport-6.cisco.com (rcdn-iport-6.cisco.com [173.37.86.77]) (using TLSv1.2 with cipher DHE-RSA-SEED-SHA (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 49EFB12D92C for <json@ietf.org>; Tue, 3 May 2016 14:24:50 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=cisco.com; i=@cisco.com; l=1024; q=dns/txt; s=iport; t=1462310690; x=1463520290; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-id:content-transfer-encoding: mime-version; bh=g2qjyqY+s9/x8C0wGF9Oj/MFO51kVM02DHeL6VAhI/8=; b=YmUgUk3FKoAPEC4sKiEmKJLA/uP0H+DW3cQSJ8EE1l9JBtCv8sAXb//F JAy3knfLri/7gFQi8SHcJFVMMedMvQG/xrLCZkamx+xOYaKkrtyCBwOD8 7UecECLZdQ1FB8X1IafmjiSX7r4FT0D+civh/vzGwZC9QMKH1ENqpdlwG o=;
X-IronPort-Anti-Spam-Filtered: true
X-IronPort-Anti-Spam-Result: A0AlAgAXFilX/40NJK1egziBUAauOYtiAQ2BdYJegzICHIEoOBQBAQEBAQEBZSeEQgEBBCMRRRACAQgaAiYCAgIfERUQAgQOBYgVAxKraIwdDYQ7AQEBAQEBAQEBAQEBAQEBAQEBAQEWfIUkgXaCV4JDgXyDACuCLgEEl2UxAYwggXePEodRh2ABHgEBQoNrbIc9fwEBAQ
X-IronPort-AV: E=Sophos;i="5.24,574,1454976000"; d="scan'208";a="100498755"
Received: from alln-core-8.cisco.com ([173.36.13.141]) by rcdn-iport-6.cisco.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 03 May 2016 21:24:49 +0000
Received: from XCH-RTP-003.cisco.com (xch-rtp-003.cisco.com [64.101.220.143]) by alln-core-8.cisco.com (8.14.5/8.14.5) with ESMTP id u43LOnEu023710 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=FAIL); Tue, 3 May 2016 21:24:49 GMT
Received: from xch-rtp-001.cisco.com (64.101.220.141) by XCH-RTP-003.cisco.com (64.101.220.143) with Microsoft SMTP Server (TLS) id 15.0.1104.5; Tue, 3 May 2016 17:24:48 -0400
Received: from xch-rtp-001.cisco.com ([64.101.220.141]) by XCH-RTP-001.cisco.com ([64.101.220.141]) with mapi id 15.00.1104.009; Tue, 3 May 2016 17:24:48 -0400
From: "Joe Hildebrand (jhildebr)" <jhildebr@cisco.com>
To: Phillip Hallam-Baker <ietf@hallambaker.com>
Thread-Topic: [Json] Schemas & so on
Thread-Index: AQHRo/U855UvMn19j0KO3qh2throzZ+mm2cAgAAOTYCAAQ5YgIAABLUAgAAM/YCAACI+AP//oQEAgABnO4D//6bFgA==
Date: Tue, 03 May 2016 21:24:48 +0000
Message-ID: <46FCFC42-3FF1-4CD5-A397-A0553B43AC39@cisco.com>
References: <CAHBU6itCV9MXmALdKtE9-vjUPG6-6ZqdqzrmZkcEzSUysi3S-w@mail.gmail.com> <AC93811D-A16A-4527-B2EB-C6A9FC6D4F17@mnot.net> <20160503010109.GA17482@mercury.ccil.org> <CAMm+LwjVnh5H4REM9tUJjb7QvL2arxjkhjWybHerxbXUvkcMdA@mail.gmail.com> <20160503172537.GM29513@mercury.ccil.org> <CAMm+LwhMyFawLEQ-e04TA9hw8nsRbG0+1f3hEAhAYc0sgNqtjA@mail.gmail.com> <b60b59d0-ec4e-fba9-fe81-13b0d924ae50@codalogic.com> <D134B11A-34D6-48C3-87EE-5BFAFDCEE757@cisco.com> <CAMm+LwjtwwVErnB3MDW_n4ONt-h5XYKg2SGGrOOqw7XwKr6zmQ@mail.gmail.com>
In-Reply-To: <CAMm+LwjtwwVErnB3MDW_n4ONt-h5XYKg2SGGrOOqw7XwKr6zmQ@mail.gmail.com>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
user-agent: Microsoft-MacOutlook/f.15.1.160411
x-ms-exchange-messagesentrepresentingtype: 1
x-ms-exchange-transport-fromentityheader: Hosted
x-originating-ip: [10.19.203.19]
Content-Type: text/plain; charset="utf-8"
Content-ID: <7A3372DEE11E0A4A8C031C4646C0B9E3@emea.cisco.com>
Content-Transfer-Encoding: base64
MIME-Version: 1.0
Archived-At: <http://mailarchive.ietf.org/arch/msg/json/YVkNCpqMC0cL_COPBapXJQu91-4>
Cc: Tim Bray <tbray@textuality.com>, John Cowan <cowan@mercury.ccil.org>, Peter Cordell <petejson@codalogic.com>, "json@ietf.org" <json@ietf.org>
Subject: Re: [Json] Schemas & so on
X-BeenThere: json@ietf.org
X-Mailman-Version: 2.1.17
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: Tue, 03 May 2016 21:24:56 -0000

On 5/3/16, 2:44 PM, "hallam@gmail.com on behalf of Phillip Hallam-Baker" <hallam@gmail.com on behalf of ietf@hallambaker.com> wrote:



>JSON does not specify limits on integer sizes. 128 would require special handling but I do INT64s all the time.

You need to test integers larger than 2^53 with the JSON implementation in ECMAscript then.  RFC 7159, section 6 says 

"""
Note that when such software is used, numbers that are integers and
   are in the range [-(2**53)+1, (2**53)-1] are interoperable in the
   sense that implementations will agree exactly on their numeric
   values.
"""

In particular, ECMAscript will corrupt your integers silently, unless they are encoded as (for example) strings. 

-- 
Joe Hildebrand