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

Matthew Morley <matt@mpcm.com> Thu, 06 June 2013 01:56 UTC

Return-Path: <mmorley@mpcm.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 2C79721F9711 for <json@ietfa.amsl.com>; Wed, 5 Jun 2013 18:56:09 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -0.377
X-Spam-Level:
X-Spam-Status: No, score=-0.377 tagged_above=-999 required=5 tests=[FM_FORGED_GMAIL=0.622, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-1]
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 qt64l6PnsRd0 for <json@ietfa.amsl.com>; Wed, 5 Jun 2013 18:56:04 -0700 (PDT)
Received: from mail-lb0-f182.google.com (mail-lb0-f182.google.com [209.85.217.182]) by ietfa.amsl.com (Postfix) with ESMTP id ADD7C21F8793 for <json@ietf.org>; Wed, 5 Jun 2013 18:56:03 -0700 (PDT)
Received: by mail-lb0-f182.google.com with SMTP id r11so1470850lbv.41 for <json@ietf.org>; Wed, 05 Jun 2013 18:56:02 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :x-gm-message-state; bh=G3Zlp7uvzOZvDFdh3VpjsVLYHyF5miGJ3U1bya4I1OA=; b=QkcVRLZs9DEnlCARTEytXM89tpiDLW3H41mwREK/N3XMg8JJraiUqBxtyPN7IQ0Huo igeNpzFd99zixjntFJZwLEONYOqbXdlQmWekOTzX9EBoPcZQ2FfrndpbZi1WnV4w8B73 +wAclWqYhRfks7cIwVpIGTisqsoFHducWsfDP9/7JplygMgsimfJkvfJhC61Z01Esemg EP51nUO4gp8VkA7ze7PTRaObmrsTFVYo8gij0XWDSLQEEa23x4HgfRHYisvfwDPZAb39 to4kHzu7GQITpVVAd+GF9aqU1lyJ16TJMBHGD3C67cHiH4M4Twmsra3CeC2vKkmx7BkK sa5Q==
MIME-Version: 1.0
X-Received: by 10.112.173.230 with SMTP id bn6mr1759263lbc.14.1370483762450; Wed, 05 Jun 2013 18:56:02 -0700 (PDT)
Sender: mmorley@mpcm.com
Received: by 10.114.160.69 with HTTP; Wed, 5 Jun 2013 18:56:02 -0700 (PDT)
In-Reply-To: <CAK3OfOh9X-J8sO+PzSeAbwxG_qiN4qm_qrdM3hPO1y0Tv15PHA@mail.gmail.com>
References: <51AF8479.5080002@crockford.com> <CAHBU6iuBhjYOVbqWE1ANvCtOw5QOUM0LWYJCsiX5DRrVaY=iKA@mail.gmail.com> <51AF8A9B.1020900@crockford.com> <51af8f23.85f8420a.597e.0ccbSMTPIN_ADDED_BROKEN@mx.google.com> <CAKd4nAi31WC_t5QYhJCvdKFHU_ZfzZ4c9fpL0v2bd+q2p0RAtA@mail.gmail.com> <CAK3OfOhJf4k5TR5GGJ4dZs1zeC5nEiurnEn7ih5Uo5TRd+pB+Q@mail.gmail.com> <51afa4ff.89e9420a.6d90.212fSMTPIN_ADDED_BROKEN@mx.google.com> <CAK3OfOh9X-J8sO+PzSeAbwxG_qiN4qm_qrdM3hPO1y0Tv15PHA@mail.gmail.com>
Date: Wed, 05 Jun 2013 21:56:02 -0400
X-Google-Sender-Auth: 3lBogcaXTE2me0ozJjqhjFzJV8E
Message-ID: <CAOXDeqrnnZcoXtdwZof4QZbHXAxWtR_agF=foyCAOjEyXAvnPw@mail.gmail.com>
From: Matthew Morley <matt@mpcm.com>
To: Nico Williams <nico@cryptonector.com>
Content-Type: multipart/alternative; boundary="001a11c23a62d4e50d04de729db5"
X-Gm-Message-State: ALoCoQl1AhqJ5vQjiC5kdc+Vopl6AmbNNfKG6MlyUn107veGjL+Fx9k2SZeTO8qOzYclZ1v2dJbW
Cc: Stephan Beal <sgbeal@googlemail.com>, Markus Lanthaler <markus.lanthaler@gmx.net>, "json@ietf.org" <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: Thu, 06 Jun 2013 01:56:09 -0000

On Wed, Jun 5, 2013 at 7:19 PM, Nico Williams <nico@cryptonector.com> wrote:

> On Wed, Jun 5, 2013 at 3:52 PM, Markus Lanthaler
> <markus.lanthaler@gmx.net> wrote:
> > I've seen people using this for comments. People relied on the fact that
> serializers ignored all but the last occurrence of a key.
>
> Oh, this might actually be important.  Perhaps the best way to handle
> comments is to have the "schema" (if there is one, stated or
> otherwise) specify some keys as being comments, but that doesn't help
> for free-form data.
>

The best way to handle 'comments' is to have them be first class citizens
in the data. It is a topic that goes back a long way, and since they were
removed with intention then, using ambiguity in the specification to re-add
them seems like a poor approach now.


> If I were doing this duplicate-keys-for-comments thing and wanted to
> ensure interop I'd triplicate them instead, with the value I actually
> want decoded sent first and last, and the comment sandwiched in
> between.  Painful.
>

Like a poorly structure compliment sandwich... best avoided. ;)

-- 
Matthew P. C. Morley