Re: [Json] Using a non-whitespace separator (Re: Working Group Last Call on draft-ietf-json-text-sequence)

"Joe Hildebrand (jhildebr)" <jhildebr@cisco.com> Wed, 04 June 2014 07:30 UTC

Return-Path: <jhildebr@cisco.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 339821A00B0 for <json@ietfa.amsl.com>; Wed, 4 Jun 2014 00:30:32 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -14.552
X-Spam-Level:
X-Spam-Status: No, score=-14.552 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, J_CHICKENPOX_14=0.6, RCVD_IN_DNSWL_HI=-5, RP_MATCHES_RCVD=-0.651, SPF_PASS=-0.001, USER_IN_DEF_DKIM_WL=-7.5] 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 0vsGLwgYrFiE for <json@ietfa.amsl.com>; Wed, 4 Jun 2014 00:30:31 -0700 (PDT)
Received: from rcdn-iport-5.cisco.com (rcdn-iport-5.cisco.com [173.37.86.76]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id E32F11A00AD for <json@ietf.org>; Wed, 4 Jun 2014 00:30:30 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=cisco.com; i=@cisco.com; l=1396; q=dns/txt; s=iport; t=1401867025; x=1403076625; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-id:content-transfer-encoding: mime-version; bh=vI+tc6hbA2elx+QV5S2JtV17RiiDwecUGRhQL20Gvi8=; b=NF9k00w2jMLobEofGfFoaDhiDsjChGf7RnAoYS3xwvwIW4n342ERnv0k cq2n2CExp2diI0s/MxDaPw2jugYRkJsM5Gr7Ywkd0jpKy/iLVh5Ye6gVU l5NyQyTNscE4ZxTIOaQ7qrzKBxLuDk33sGCLZ8e0Yb+Tl14diM36TcLmg 4=;
X-IronPort-Anti-Spam-Filtered: true
X-IronPort-Anti-Spam-Result: AhULAFvKjlOtJV2U/2dsb2JhbABZgweBKoJsp1gBBAUBmCcBGXUWdIImAQEEIxFFEAIBCBoCHwcCAgIwFRACBAENBYhCrG6ldReBKoQrg16FHweCdYFLAQOaD5M2gXiBQIIv
X-IronPort-AV: E=Sophos;i="4.98,971,1392163200"; d="scan'208";a="330380404"
Received: from rcdn-core-12.cisco.com ([173.37.93.148]) by rcdn-iport-5.cisco.com with ESMTP; 04 Jun 2014 07:30:23 +0000
Received: from xhc-rcd-x14.cisco.com (xhc-rcd-x14.cisco.com [173.37.183.88]) by rcdn-core-12.cisco.com (8.14.5/8.14.5) with ESMTP id s547UNYE026093 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=FAIL); Wed, 4 Jun 2014 07:30:23 GMT
Received: from xmb-rcd-x10.cisco.com ([169.254.15.76]) by xhc-rcd-x14.cisco.com ([173.37.183.88]) with mapi id 14.03.0123.003; Wed, 4 Jun 2014 02:30:23 -0500
From: "Joe Hildebrand (jhildebr)" <jhildebr@cisco.com>
To: Nico Williams <nico@cryptonector.com>, Paul Hoffman <paul.hoffman@vpnc.org>
Thread-Topic: [Json] Using a non-whitespace separator (Re: Working Group Last Call on draft-ietf-json-text-sequence)
Thread-Index: AQHPfVekIfY8Dj+1sEOKyquOPH0Q0ZtdLJQAgAAKXoCAAABZgIAAAUAAgAAMtACAAzz/gA==
Date: Wed, 04 Jun 2014 07:30:23 +0000
Message-ID: <CFB42410.4EDDC%jhildebr@cisco.com>
References: <CAK3OfOidgk13ShPzpF-cxBHeg34s99CHs=bpY1rW-yBwnpPC-g@mail.gmail.com> <CAHBU6itr=ogxP4uoj57goEUSOCpsRx1AXVnW1NQwSTPxbbttkw@mail.gmail.com> <CAK3OfOhft+XJeMrg5rdY9E6fxAkJ2qsT3UHwu7zt=NEz2Q3XOQ@mail.gmail.com> <CAK3OfOhy-N0zjCVxtOMB8SqZEKceVvBz9Y6i0fo2W8i+gHKm4Q@mail.gmail.com> <CAK3OfOiQnLq29cv+kas3B8it-+82VmXvL3Rq1C5_767FDhBjRg@mail.gmail.com> <03CFAB3E-F4C6-4AE8-A501-8525376C4AA7@vpnc.org> <CAK3OfOja-17V391tTK91R98X8XQzd0iPnur2=oo4ii+MCOt+Rg@mail.gmail.com>
In-Reply-To: <CAK3OfOja-17V391tTK91R98X8XQzd0iPnur2=oo4ii+MCOt+Rg@mail.gmail.com>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
user-agent: Microsoft-MacOutlook/14.4.2.140509
x-originating-ip: [10.21.82.85]
Content-Type: text/plain; charset="utf-8"
Content-ID: <4CD10ACBFAC9B6478F9D3334F11718CE@emea.cisco.com>
Content-Transfer-Encoding: base64
MIME-Version: 1.0
Archived-At: http://mailarchive.ietf.org/arch/msg/json/3Vo-biRevaJHYPVBK9r-QLrNLSw
Cc: IETF JSON WG <json@ietf.org>
Subject: Re: [Json] Using a non-whitespace separator (Re: Working Group Last Call on draft-ietf-json-text-sequence)
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: Wed, 04 Jun 2014 07:30:32 -0000

On 6/1/14, 6:03 PM, "Nico Williams" <nico@cryptonector.com> wrote:

>5) #4 with ASCII RS as the separator

This is the best one on the list.  It's what RS is for.  If you also want
to allow optional inter-item ignorable whitespace (e.g. \n) for better
printability, you get everything you want.  RS is only used for parser
state synchronization.  RS is forbidden in a JSON text by 7159, so it's
unambiguously a recoverable parse error if it is detected in the middle of
an item.  Grep works fine with this format, particularly when combined
with newlines.  Several editors I tried worked fine with it; one even
rendered the RS as a nice RS-surrounded-by-box glyph.  It's certainly
going to be more interoperable with tooling than U+FFFE, for example.

I also agree with Tim that there should be precisely one way of doing item
separation.  Having to do multiple ways is going to make the parsers
slower and more complicated than they have to be, for no technical benefit.

-- 
Joe Hildebrand