Re: [Json] The names within an object SHOULD be unique.

"Joe Hildebrand (jhildebr)" <jhildebr@cisco.com> Tue, 30 July 2013 14:11 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 AD88521F9C98 for <json@ietfa.amsl.com>; Tue, 30 Jul 2013 07:11:51 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -10.649
X-Spam-Level:
X-Spam-Status: No, score=-10.649 tagged_above=-999 required=5 tests=[AWL=-0.050, BAYES_00=-2.599, RCVD_IN_DNSWL_HI=-8]
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 EnpIOgjG98Jb for <json@ietfa.amsl.com>; Tue, 30 Jul 2013 07:11:46 -0700 (PDT)
Received: from rcdn-iport-2.cisco.com (rcdn-iport-2.cisco.com [173.37.86.73]) by ietfa.amsl.com (Postfix) with ESMTP id DAEFE21F9C8E for <json@ietf.org>; Tue, 30 Jul 2013 07:11:45 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=cisco.com; i=@cisco.com; l=1229; q=dns/txt; s=iport; t=1375193506; x=1376403106; h=from:to:cc:subject:date:message-id:in-reply-to: content-id:content-transfer-encoding:mime-version; bh=wPIy9yspuj5tqyoo5nKIf/E2W4IJvD0WURaCD9cKzCM=; b=Oj0ZTvJQMae4oBqsA4kMNZh6cfC9ptdP8t6Mgy++Eb2wL9wW6OwiVT2+ +B2vC8WJ7Gru1eKmPZIftIKAl33jToJqsmS0YCMXEVDMeIWSuzePlwkru M6VPc0PvhsfEwFPlSsc2Jpm/OABPohQWSQ3WEZKtQ8fUzVy2fZEbNOLCJ Q=;
X-IronPort-Anti-Spam-Filtered: true
X-IronPort-Anti-Spam-Result: AiAFAEDJ91GtJXG8/2dsb2JhbABbgwaBBb4TgRwWdIIkAQEBBDo/EgEIGAoUQiUCBAENBQiICLlFj00xB4MYcQOpK4MUgio
X-IronPort-AV: E=Sophos;i="4.89,778,1367971200"; d="scan'208";a="241275417"
Received: from rcdn-core2-1.cisco.com ([173.37.113.188]) by rcdn-iport-2.cisco.com with ESMTP; 30 Jul 2013 14:11:43 +0000
Received: from xhc-rcd-x06.cisco.com (xhc-rcd-x06.cisco.com [173.37.183.80]) by rcdn-core2-1.cisco.com (8.14.5/8.14.5) with ESMTP id r6UEBhke030547 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=FAIL); Tue, 30 Jul 2013 14:11:43 GMT
Received: from xmb-rcd-x10.cisco.com ([169.254.15.159]) by xhc-rcd-x06.cisco.com ([173.37.183.80]) with mapi id 14.02.0318.004; Tue, 30 Jul 2013 09:11:43 -0500
From: "Joe Hildebrand (jhildebr)" <jhildebr@cisco.com>
To: Jorge Chamorro <jorge@jorgechamorro.com>, John Cowan <cowan@mercury.ccil.org>
Thread-Topic: [Json] The names within an object SHOULD be unique.
Thread-Index: AQHOjRWPznIDsqv3OEu+RBDvEECeupl9uJcA
Date: Tue, 30 Jul 2013 14:11:42 +0000
Message-ID: <A723FC6ECC552A4D8C8249D9E07425A71416EFE8@xmb-rcd-x10.cisco.com>
In-Reply-To: <B4EBDF80-ED3C-4BAA-9441-AC1B46ED5D6A@jorgechamorro.com>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
user-agent: Microsoft-MacOutlook/14.3.6.130613
x-originating-ip: [10.21.75.253]
Content-Type: text/plain; charset="us-ascii"
Content-ID: <66627F5C792005429441450B182ACB12@emea.cisco.com>
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
Cc: "json@ietf.org WG" <json@ietf.org>
Subject: Re: [Json] The names within an object SHOULD be unique.
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: Tue, 30 Jul 2013 14:11:52 -0000

On 7/30/13 1:11 PM, "Jorge Chamorro" <jorge@jorgechamorro.com> wrote:

>On 28/07/2013, at 05:46, John Cowan wrote:
>> Jorge Chamorro scripsit:
>> 
>>> Yes, but it's problematic only for the streaming parsers that emit
>>> [key,value] pairs, not for those which emit entire objects.
>> 
>> In what sense are they streaming parsers, then?  The whole idea of a
>>streaming
>> parser is that it passes along the elements of JSON objects, arrays, and
>> perhaps even strings and numbers bit by bit to the invoking application.
>
>Say you've got a stream (a pipe or a network connection) and a stream of
>json-objects arriving through it, you may very well want the parser to
>emit entire objects instead of its parts, no?

I've never seen an implementation that is both streaming and not streaming
at the same time.  Can you say more about how you'd write the API for
that?  Better, can you give an example of such an implementation?

If you mean an application that takes a stream of complete JSON objects
without wrapping them in an array, that problem is likely out of scope,
and the processor would act identically to a non-streaming implementation
in our existing worldview.

-- 
Joe Hildebrand