[Json] Some thoughts on the "text model" discussion

Pete Resnick <presnick@qti.qualcomm.com> Wed, 31 July 2013 09:15 UTC

Return-Path: <presnick@qti.qualcomm.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 2FDB621F9E73 for <json@ietfa.amsl.com>; Wed, 31 Jul 2013 02:15:55 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -102.203
X-Spam-Level:
X-Spam-Status: No, score=-102.203 tagged_above=-999 required=5 tests=[AWL=0.396, BAYES_00=-2.599, USER_IN_WHITELIST=-100]
Received: from mail.ietf.org ([12.22.58.30]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id cRdObiLR9xG8 for <json@ietfa.amsl.com>; Wed, 31 Jul 2013 02:15:49 -0700 (PDT)
Received: from sabertooth02.qualcomm.com (sabertooth02.qualcomm.com [65.197.215.38]) by ietfa.amsl.com (Postfix) with ESMTP id F041A21F9A3C for <json@ietf.org>; Wed, 31 Jul 2013 02:11:12 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=qti.qualcomm.com; i=@qti.qualcomm.com; q=dns/txt; s=qcdkim; t=1375261872; x=1406797872; h=message-id:date:from:mime-version:to:subject: content-transfer-encoding; bh=K1x/6/Rnd5Q1GS8COXvadWyWVpneAb0par26K+1A6cA=; b=Ihr1RE93HJXDVStJMXa/hBWbkXyyH9UQBVwJjP4yeBa6s2ErjhmEfR6u 8YJknDGsVNKIJ0fmbvlDpMFjI8+ZqpjEIpi+N0t09ZHK73y/a+x1ib34D DIUaWDgqUQA1fwKb/+ZHBgsT5G91hvqWg0iRTL7lq1iIoVIaYtd+pwZV7 c=;
X-IronPort-AV: E=Sophos;i="4.89,785,1367996400"; d="scan'208";a="48635297"
Received: from ironmsg01-lv.qualcomm.com ([10.47.202.180]) by sabertooth02.qualcomm.com with ESMTP; 31 Jul 2013 02:11:11 -0700
Received: from nasanexhc04.na.qualcomm.com ([172.30.48.17]) by ironmsg01-lv.qualcomm.com with ESMTP/TLS/RC4-SHA; 31 Jul 2013 02:11:11 -0700
Received: from dhcp-45fa.meeting.ietf.org (172.30.48.1) by qcmail1.qualcomm.com (172.30.48.17) with Microsoft SMTP Server (TLS) id 14.3.146.0; Wed, 31 Jul 2013 02:11:10 -0700
Message-ID: <51F8D4AC.7080301@qti.qualcomm.com>
Date: Wed, 31 Jul 2013 11:11:08 +0200
From: Pete Resnick <presnick@qti.qualcomm.com>
User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.7; en-US; rv:1.9.1.9) Gecko/20100630 Eudora/3.0.4
MIME-Version: 1.0
To: json@ietf.org
Content-Type: text/plain; charset="ISO-8859-1"; format="flowed"
Content-Transfer-Encoding: 7bit
X-Originating-IP: [172.30.48.1]
Subject: [Json] Some thoughts on the "text model" discussion
X-BeenThere: json@ietf.org
X-Mailman-Version: 2.1.12
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, 31 Jul 2013 09:15:56 -0000

Like Matt said of the duplicate names discussion, I think we do appear 
to be converging (albeit more slowly) on a couple of possible outcomes 
in the discussion of the text model. I'll leave it to the chairs to 
truly summarize conclusions, but I did want to make a couple of 
observations that I hope can hone in on a few of those conclusions:

- People did quickly slide from my more overarching question about what 
makes up a JSON entity to the specific question about JSON strings in 
particular. Though clearly my aim was to inform the issue of strings, I 
was hoping we could come up with a more general principle. In the end, I 
think we made some good progress on figuring out those general principles.

- The discussion at the beginning regarding "a JSON object" vs. "a JSON 
text" was very revealing to me because it leads me to believe that 
nowhere do we have a general concept of a "JSON entity" aside from it 
encoding or representation in memory. I think that has made some of the 
discussion more difficult, but my sense is that we now share a more 
general view of what such a thing might be. This leads to another point:

- The use of the terms "JSON parser" and "JSON generator" is often 
conflated with things that I would refer to as a "JSON lexer" on the 
parsing end of things and an "JSON encoder" or maybe a "JSON token 
producer" on the generator end of things. That is, when I think of a 
"JSON parser", I think of something that understands the semantics of 
the JSON entity it is creating out of the JSON text it is parsing, and 
conversely a "JSON generator" knows about the semantics of the JSON 
entity it is turning into a JSON text from some in-memory 
representation. Some of the difficulty in the conversation is that we 
know of pieces of code that don't know about the semantics and therefore 
don't "know" whether they are dealing with Unicode characters or just a 
series of Unicode scalar values. (This caused similar confusions in the 
duplicate names discussion.) Requirements on things that have to know 
the semantics are different than the requirements on things that are 
simply lexers or encoders. How we explain that (and what language we use 
for it) in the documents is independent of the point that they are 
different requirements.

For each of these three items, I think if we end up with some 
explanatory text in the documents that helps make the appropriate 
distinctions (and note that I am being purposely agnostic on what the WG 
should say about each of them), I think that would help the clarity and 
implementability of the spec.

I'll leave it to the chairs to decide where to take the discussion from 
here.

pr

-- 
Pete Resnick<http://www.qualcomm.com/~presnick/>
Qualcomm Technologies, Inc. - +1 (858)651-4478