Re: [Json] Nudging the English-language vs. formalisms discussion forward
Phillip Hallam-Baker <hallam@gmail.com> Thu, 20 February 2014 16:06 UTC
Return-Path: <hallam@gmail.com>
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 D35D11A01EF for <json@ietfa.amsl.com>; Thu, 20 Feb 2014 08:06:32 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.999
X-Spam-Level:
X-Spam-Status: No, score=-1.999 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, 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 odBTIk9cr8wT for <json@ietfa.amsl.com>; Thu, 20 Feb 2014 08:06:30 -0800 (PST)
Received: from mail-la0-x22e.google.com (mail-la0-x22e.google.com [IPv6:2a00:1450:4010:c03::22e]) by ietfa.amsl.com (Postfix) with ESMTP id 101B01A01DA for <json@ietf.org>; Thu, 20 Feb 2014 08:06:29 -0800 (PST)
Received: by mail-la0-f46.google.com with SMTP id b8so1473970lan.19 for <json@ietf.org>; Thu, 20 Feb 2014 08:06:25 -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=YzBMCZg9Cln0Fe9Gyzt8Lpa9jUNlHA5hToZ2cyezWgY=; b=kyOcSNXbEK28c9KFGvP/du1GeWtjaITwVhi2e1Ob+2wqwbTWNvKOcjxfK2r1L94tuu EM1OM9XVUPlwiGI3l5pfeiBK60hDTdjNwnWLz415EVRj6s/rpv5ycDGNRPpFBPcCSKke W3StKgW9PV/YpRBJAefHHWU46g75aPCPvsBxjW451TrqzlX1SYlnjmt/71yBupLMpGV5 dnjLBldDuK3T7Uoh86AGgXlgq5/Hs4+q6oGdLXp2RHcuJmVa1COSDvcEmF5HacmAnBsM MCcafRmhUDmSl+d4ikugu6MJya8HiamKwImCGjmsg8LmAFW1t06Nxlgc9/zOSi6URAEk Jj7A==
MIME-Version: 1.0
X-Received: by 10.112.138.233 with SMTP id qt9mr1578460lbb.34.1392912385711; Thu, 20 Feb 2014 08:06:25 -0800 (PST)
Received: by 10.112.37.168 with HTTP; Thu, 20 Feb 2014 08:06:25 -0800 (PST)
In-Reply-To: <AF211B67DB3D453D9DE8F8FA53886F73@codalogic>
References: <C87F9B96-E028-4F0E-A950-B39D3F68FFE7@vpnc.org> <CAMm+LwhUh_yN-hzaoDWfrO_H2iGvYvj99BCE4EcYmgqCPqXoVQ@mail.gmail.com> <CAHBU6itpttXBfVQGKw=u==k_XSdrht81+m_YDNZP6RM+=9CNow@mail.gmail.com> <CAK3OfOjHkBFOzJSx=bhhoQJ8Z2bWyEXK52dNyYGWVb9FAj99ow@mail.gmail.com> <CAHBU6itzQ0rzU3EUYUqzm2qhx03qk1mpx2sehS_zeiw1ypcEgw@mail.gmail.com> <CAK3OfOhfjkbq6eREkt=MBVL1C9ubh-6My3Lvg-mnOxD0+cpN1Q@mail.gmail.com> <CAHBU6isZbew8O1HJ+XcFsMCR42iDoO_uemPXVwa3=vM5A=MngA@mail.gmail.com> <CAK3OfOgmVsNJqrqCfsD7h37axssOoaX3DGHqO=bTn5bWrA+MFA@mail.gmail.com> <A4B53816-6FBF-4A37-8BC9-F0A9D0867BCD@tzi.org> <357740A8AA0F4316BE630917321FAB4D@codalogic> <B1EBE05A69362F001777F807@cyrus.local> <47BB9131737D42218A6382DEF45BBE2C@codalogic> <CAMm+LwgmHjoLu2=zTOERN8LO74hWpp45yy2epd2JzqDRM9oFfg@mail.gmail.com> <AF211B67DB3D453D9DE8F8FA53886F73@codalogic>
Date: Thu, 20 Feb 2014 11:06:25 -0500
Message-ID: <CAMm+LwguTBkGQBHN+e2kU6XxECsic9Kcvda+7X6KDNe0TQxq4w@mail.gmail.com>
From: Phillip Hallam-Baker <hallam@gmail.com>
To: Pete Cordell <petejson@codalogic.com>
Content-Type: multipart/alternative; boundary="089e01229710f4243804f2d8afe0"
Archived-At: http://mailarchive.ietf.org/arch/msg/json/FpJli4Mv0PJAa2dm8HG1_25ufFA
Cc: Cyrus Daboo <cyrus@daboo.name>, Carsten Bormann <cabo@tzi.org>, JSON WG <json@ietf.org>
Subject: Re: [Json] Nudging the English-language vs. formalisms discussion forward
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: <http://www.ietf.org/mail-archive/web/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: Thu, 20 Feb 2014 16:06:33 -0000
(trimmed) On Thu, Feb 20, 2014 at 10:22 AM, Pete Cordell <petejson@codalogic.com>wrote: > ----- Original Message From: "Phillip Hallam-Baker" > > > IETF has not decided how to make JSON protocols composable. >> > > Isn't that why we're here? It is why the group is here. But my point is that the group should decide how to compose protocols and the people developing schemas should support those tropes that are chosen. So it is a separate problem. If people decide on how to do this, I will be happy to extend my tool. But I don't think how this problem is solved should be a way to decide between tools. Yes, QNames are broken, so don't do that. Think more packages in Java, > namespaces in C#. As simple as doing something like: > > int port; > com.ietf.sip.contact contact; > > yields JSON of: > > "port": 25, "contact": "...whatever..." > > We don't have to make things complicated! That is a model that I could very easily support as my tool is written in C#. In fact it already supports that kind of type label. All I would have to do is add in 'Using' specifiers at the top. The only thing it doesn't support are those semicolons. I find a carriage return is enough. Incidentally, this is what I meant when I said that discussion of the schema ideas and merger might be more useful than more proposals. > I disagree, I don't think the schema should address sub-syntax at all >> except for a small number of encodings that are RFCs such as RFC3339 >> timestamps, URIs and DNS labels > > > I disagree with this. Dates alone illustrate that there are > 'microformats' that can result in a much more compact, meaningful and > useful format than say: > > { "date": 25, "month": 12, "year": 2015, "hour": 12, "min": 0 } > But we already have an RFC for Date - RFC 3339. (Actually we have others but we will forget those). So this is one of the microformats that I define in the tool as intrinsic. This also allows for the use of Integer encodings for DateTimes using seconds since the start of some epoch. > Another location format might be: > > 56°14'23.45"N,18°5'16.65"W > { [56,14,23,45], [-18,-5,-16,-65]} Forcing such formats to be JSONified may cause as much error as forcing > IEEE 754 numbers to be decimalised. > It is certainly possible to do the job wrong but the above does not result in any loss of precision. The only case where I would feel comfortable with the microformat above is if the protocol was interfacing to some application where that format was already defined and translation between the formats would be needed. So let's learn from the past and recognise that we can't build them all in > upfront and design our format accordingly. There may be a need for a microformat. But that should be rare and should probably be specified in ABNF rather than the JSON schema. In most real world examples you are going to get far more leverage by >> sticking to only encoding in JSON data model and then finding an efficient >> way to encode JSON rather than inventing ad-hoc microformats that are >> neither JSON nor JSON data model, are going to require a custom parser and >> are not going to compress. >> > > I'm not interested in compression beyond zip and co. It may sound harsh > of me, but my feeling is if this or the errors in floating point numbers is > critical to you, then use something else. We don't need something that is > all things, to all people. If someone is saying 'I only want text, space isn't important' then fine, just use text. But if someone is saying 'lets use JSON but then lets avoid making it too verbose using these microformats to shave a few bytes' then I would much prefer to just use an efficient encoding. Unless dealing with text documents, LZ compression of an inefficient encoding is not as effective as an efficient encoding in the first place. If the threat of a binary encoding causes someone to withdraw an ad-hoc microformat then its done its job... -- Website: http://hallambaker.com/
- [Json] Nudging the English-language vs. formalism… Paul Hoffman
- Re: [Json] Nudging the English-language vs. forma… Phillip Hallam-Baker
- Re: [Json] Nudging the English-language vs. forma… Nico Williams
- Re: [Json] Nudging the English-language vs. forma… Paul Hoffman
- Re: [Json] Nudging the English-language vs. forma… Phillip Hallam-Baker
- [Json] Nudging the English-language vs. formalism… Paul Hoffman
- Re: [Json] Nudging the English-language vs. forma… Tim Bray
- Re: [Json] Nudging the English-language vs. forma… Phillip Hallam-Baker
- Re: [Json] Nudging the English-language vs. forma… Tim Bray
- Re: [Json] Nudging the English-language vs. forma… Nico Williams
- Re: [Json] Nudging the English-language vs. forma… John Cowan
- Re: [Json] Nudging the English-language vs. forma… Phillip Hallam-Baker
- Re: [Json] Nudging the English-language vs. forma… Tim Bray
- Re: [Json] Nudging the English-language vs. forma… Nico Williams
- Re: [Json] Nudging the English-language vs. forma… Tim Bray
- Re: [Json] Nudging the English-language vs. forma… John Cowan
- Re: [Json] Nudging the English-language vs. forma… Tim Bray
- Re: [Json] Nudging the English-language vs. forma… Nico Williams
- Re: [Json] Nudging the English-language vs. forma… Nico Williams
- Re: [Json] Nudging the English-language vs. forma… Pete Cordell
- Re: [Json] Nudging the English-language vs. forma… Pete Cordell
- Re: [Json] Nudging the English-language vs. forma… Tim Bray
- Re: [Json] Nudging the English-language vs. forma… Nico Williams
- Re: [Json] Nudging the English-language vs. forma… Phillip Hallam-Baker
- Re: [Json] Nudging the English-language vs. forma… Tatu Saloranta
- Re: [Json] Nudging the English-language vs. forma… Carsten Bormann
- Re: [Json] Nudging the English-language vs. forma… John Cowan
- Re: [Json] Nudging the English-language vs. forma… John Cowan
- Re: [Json] Nudging the English-language vs. forma… Barry Leiba
- Re: [Json] Nudging the English-language vs. forma… Mark Nottingham
- Re: [Json] Nudging the English-language vs. forma… Phillip Hallam-Baker
- Re: [Json] Nudging the English-language vs. forma… Andrew Newton
- Re: [Json] Nudging the English-language vs. forma… Phillip Hallam-Baker
- Re: [Json] Nudging the English-language vs. forma… Pete Cordell
- Re: [Json] Nudging the English-language vs. forma… Barry Leiba
- Re: [Json] Nudging the English-language vs. forma… Bjoern Hoehrmann
- Re: [Json] Nudging the English-language vs. forma… John Cowan
- Re: [Json] Nudging the English-language vs. forma… Nico Williams
- Re: [Json] Nudging the English-language vs. forma… Nico Williams
- Re: [Json] Nudging the English-language vs. forma… Manger, James
- Re: [Json] Nudging the English-language vs. forma… Tim Bray
- Re: [Json] Nudging the English-language vs. forma… Nico Williams
- Re: [Json] Nudging the English-language vs. forma… Phillip Hallam-Baker
- Re: [Json] Nudging the English-language vs. forma… Mark Nottingham
- Re: [Json] Nudging the English-language vs. forma… Nico Williams
- Re: [Json] Nudging the English-language vs. forma… Cyrus Daboo
- Re: [Json] Nudging the English-language vs. forma… Andrew Newton
- Re: [Json] Nudging the English-language vs. forma… Paul Hoffman
- Re: [Json] Nudging the English-language vs. forma… Pete Cordell
- Re: [Json] Nudging the English-language vs. forma… Phillip Hallam-Baker
- Re: [Json] Nudging the English-language vs. forma… John Cowan
- Re: [Json] Nudging the English-language vs. forma… Pete Cordell
- Re: [Json] Nudging the English-language vs. forma… Phillip Hallam-Baker
- [Json] Schema Requirements (Was: Re: Nudging the … Pete Cordell
- Re: [Json] Schema Requirements (Was: Re: Nudging … Phillip Hallam-Baker
- Re: [Json] Schema Requirements (Was: Re: Nudging … Nico Williams
- Re: [Json] Schema Requirements (Was: Re: Nudging … Nico Williams
- Re: [Json] Schema Requirements (Was: Re: Nudging … Phillip Hallam-Baker
- Re: [Json] Schema Requirements (Was: Re: Nudging … Nico Williams
- Re: [Json] Schema Requirements (Was: Re: Nudging … Pete Cordell
- Re: [Json] Schema Requirements (Was: Re: Nudging … Phillip Hallam-Baker
- Re: [Json] Schema Requirements (Was: Re: Nudging … Pete Cordell
- Re: [Json] Schema Requirements (Was: Re: Nudging … Nico Williams
- Re: [Json] Schema Requirements (Was: Re: Nudging … Pete Cordell
- Re: [Json] Schema Requirements (Was: Re: Nudging … Nico Williams
- Re: [Json] Schema Requirements (Was: Re: Nudging … Pete Cordell