Re: [Json] What is a JSON-text? [REVISITED]

Nico Williams <nico@cryptonector.com> Thu, 03 October 2013 18:41 UTC

Return-Path: <nico@cryptonector.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 8017221F94FA for <json@ietfa.amsl.com>; Thu, 3 Oct 2013 11:41:58 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.977
X-Spam-Level:
X-Spam-Status: No, score=-1.977 tagged_above=-999 required=5 tests=[BAYES_00=-2.599, FM_FORGED_GMAIL=0.622]
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 JUGMKazACmZC for <json@ietfa.amsl.com>; Thu, 3 Oct 2013 11:41:39 -0700 (PDT)
Received: from homiemail-a67.g.dreamhost.com (caiajhbdcbef.dreamhost.com [208.97.132.145]) by ietfa.amsl.com (Postfix) with ESMTP id 5C38121E808D for <json@ietf.org>; Thu, 3 Oct 2013 11:33:04 -0700 (PDT)
Received: from homiemail-a67.g.dreamhost.com (localhost [127.0.0.1]) by homiemail-a67.g.dreamhost.com (Postfix) with ESMTP id 2C5B927BC061 for <json@ietf.org>; Thu, 3 Oct 2013 11:33:04 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=cryptonector.com; h= mime-version:in-reply-to:references:date:message-id:subject:from :to:cc:content-type; s=cryptonector.com; bh=YVvC72TtsdTDIHO/2j38 D58DTt4=; b=B6LHv7myu/k1q8DFBOUGosgyIGrLF0ywluPRIqBjWZtgoWw/vRNn swTSyh6D/tFbmtLuxhGC6hTiDyAaPEqf/AEXscbmnJTMkV8KrwYlsp8LND0o1SNl tyi4YZiTFyOCgWGeF2RWtIkVe01GnieCDwIQILkbSzbgwy7azFh/HxQ=
Received: from mail-we0-f179.google.com (mail-we0-f179.google.com [74.125.82.179]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) (Authenticated sender: nico@cryptonector.com) by homiemail-a67.g.dreamhost.com (Postfix) with ESMTPSA id B9E0A27BC05D for <json@ietf.org>; Thu, 3 Oct 2013 11:33:03 -0700 (PDT)
Received: by mail-we0-f179.google.com with SMTP id x55so3331185wes.10 for <json@ietf.org>; Thu, 03 Oct 2013 11:33:02 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=xOnB0u0A0N8iZ4UsSUKx68x05fhfpbDBI3YEKQYynsI=; b=Kz9FIjA8oTBJi/Im+XHaBZAHagIQC0WfASw0QRs+UQOAuRd/+m3rJBVi7CgCs6iJdK FpvL+RhPv8UsO0YN+Osh6sCQF1cMx1ddmt3Sw2jOJ3NiMOjEIiUH+zhR+mOmMt1bS8fM uVL465bDTM582PvSZ993DgWmzAMXlC4J7mpAiuLhNwAk/Zgath+HkpXnFQKMkJgCVpV6 2u2Jyn7OKmAsfH2lth/rr3az9EiuxOEEeJ43qaRo+H4fCXu/WX2vYHguumQOyycVuOw6 7+ujra3HE3tJCotonY64CnQo7334VO9vmp+Jo9HbnjN2+H1MpxzvDmemKM1NNor+rKdy OeQw==
MIME-Version: 1.0
X-Received: by 10.180.198.79 with SMTP id ja15mr3802556wic.36.1380825182272; Thu, 03 Oct 2013 11:33:02 -0700 (PDT)
Received: by 10.216.165.5 with HTTP; Thu, 3 Oct 2013 11:33:02 -0700 (PDT)
In-Reply-To: <CAK3OfOhRCCfNWHD-qSXOmswE7DL+QFefE_pvQO5g24NJ9q07hg@mail.gmail.com>
References: <BF7E36B9C495A6468E8EC573603ED9411EF2B583@xmb-aln-x11.cisco.com> <CAHBU6iv7gT8nebFnz_mHQVZ3z8Kz+Pb8VRrSkMf44QRqWL8QjA@mail.gmail.com> <524DAEBF.1020509@drees.name> <CAK3OfOhRCCfNWHD-qSXOmswE7DL+QFefE_pvQO5g24NJ9q07hg@mail.gmail.com>
Date: Thu, 03 Oct 2013 13:33:02 -0500
Message-ID: <CAK3OfOh=xdp2Gef-zwwYBE=BtQ7kA1mQYYiVsncTCt7vvwCxVQ@mail.gmail.com>
From: Nico Williams <nico@cryptonector.com>
To: "stefan@drees.name" <stefan@drees.name>
Content-Type: text/plain; charset="UTF-8"
Cc: "Matt Miller (mamille2)" <mamille2@cisco.com>, Tim Bray <tbray@textuality.com>, JSON WG <json@ietf.org>
Subject: Re: [Json] What is a JSON-text? [REVISITED]
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, 03 Oct 2013 18:41:58 -0000

On Thu, Oct 3, 2013 at 1:24 PM, Nico Williams <nico@cryptonector.com> wrote:
> Because JSON isn't always used to transport values across networks
> (where it'd be silly to send scalar values with all the overheade of
> HTTP and TCP/IP, say).  JSON is often used for interop between local
> components, where the overhead that would make laughable the use of
> scalar values at the top-level just doesn't apply.  E.g., the Python
> bindings to libjq.  Indeed, here your suggestion that I call "lame"
> *adds* undesirable overhead.

I should add that the overhead is also developer overhead: having to
create the array/object to contain the solitary scalar value, then
destructure it to get it back.

I don't care if you have two JSON text definitions (see previous post)
or just allow all value types at the top-level.  It's the same to me,
as long as parser implementors know to provide the option for it (if
they don't just bleeping allow all value types at the top-level
outright, no option necessary, especially so for those implementations
that use run-time typing, which includes several C implementations,
FYI).

Nico
--