Re: [Json] Proposed minimal change for duplicate names in objects

John Cowan <> Fri, 12 July 2013 15:35 UTC

Return-Path: <>
Received: from localhost (localhost []) by (Postfix) with ESMTP id 177EA21F9E29 for <>; Fri, 12 Jul 2013 08:35:35 -0700 (PDT)
X-Virus-Scanned: amavisd-new at
X-Spam-Flag: NO
X-Spam-Score: -3.574
X-Spam-Status: No, score=-3.574 tagged_above=-999 required=5 tests=[AWL=0.025, BAYES_00=-2.599, RCVD_IN_DNSWL_LOW=-1]
Received: from ([]) by localhost ( []) (amavisd-new, port 10024) with ESMTP id du4XKksb24M1 for <>; Fri, 12 Jul 2013 08:35:24 -0700 (PDT)
Received: from ( []) by (Postfix) with ESMTP id B2A4221F9E15 for <>; Fri, 12 Jul 2013 08:35:23 -0700 (PDT)
Received: from cowan by with local (Exim 4.72) (envelope-from <>) id 1UxfNN-00026v-QE; Fri, 12 Jul 2013 11:35:17 -0400
Date: Fri, 12 Jul 2013 11:35:17 -0400
From: John Cowan <>
To: Stefan Drees <>
Message-ID: <>
References: <> <> <> <> <> <> <>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <>
User-Agent: Mutt/1.5.20 (2009-06-14)
Sender: John Cowan <>
Cc: Nico Williams <>, Paul Hoffman <>, Eliot Lear <>, " WG" <>
Subject: Re: [Json] Proposed minimal change for duplicate names in objects
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: "JavaScript Object Notation \(JSON\) WG mailing list" <>
List-Unsubscribe: <>, <>
List-Archive: <>
List-Post: <>
List-Help: <>
List-Subscribe: <>, <>
X-List-Received-Date: Fri, 12 Jul 2013 15:35:35 -0000

Stefan Drees scripsit:

> "lose" what? If this "anyone" (it) wants a self-describing robust form
> to interchange data, it will annotate it with metadata accordingly,
> publish the dictionary, or choose microxml or the like.

"Deserves to lose" is an idiom meaning "deserves the unfortunate
consequences of one's actions."

> A say sensor automat observing some features, serializing the extracted
> info into JSON and pushing this to another collecting automat first
> finds some name for the subject ("Stefan") than estimates from
> processing further, that this should be tagged with attribute A
> ("male"), starts a json object (to wrap it), enters the first member
> "Stefan":"male", eventualy pushes the json text part upstream, processes
> next observation B "native German", notes it linked to the same subject
> as member "Stefan": "native German" and pushes ...

My view is that this application design (as opposed, say, to using an
array of single-element objects) is an inappropriate way to use JSON,
depending as it does on a feature (support for duplicate names) that is
not widely provided.

> Why not leave this possibility open, more human like bots might act
> this way very conveniently, mixing some serial processing somewhere
> along the way.

It's not much more convenient than [{"Stefan" : "male}, {"Stefan" :
"native German", ...], which is entirely safe.

> That's very nice, John, thanks. But you gave it some thought,
> backtracked mayb, edited and it is very deep nested for a record
> missing the family name ;-) That could be some digested output of
> the receiving end in my "HumBotTalk" scenario above.

True.  I wanted it to represent in a machine-processable way all the
information in your version (which is not very machine-processable).

Overhead, without any fuss, the stars were going out.
        --Arthur C. Clarke, "The Nine Billion Names of God"
                John Cowan <>