Re: [Json] On flat vs nested JSON encoding style

Phillip Hallam-Baker <phill@hallambaker.com> Fri, 05 February 2016 01:09 UTC

Return-Path: <hallam@gmail.com>
X-Original-To: json@ietfa.amsl.com
Delivered-To: json@ietfa.amsl.com
Received: from localhost (ietfa.amsl.com [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 391BF1B2BAE for <json@ietfa.amsl.com>; Thu, 4 Feb 2016 17:09:58 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.278
X-Spam-Level:
X-Spam-Status: No, score=-1.278 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, FM_FORGED_GMAIL=0.622, FREEMAIL_FROM=0.001, SPF_PASS=-0.001] autolearn=no
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id tfCfmzKsW0gV for <json@ietfa.amsl.com>; Thu, 4 Feb 2016 17:09:57 -0800 (PST)
Received: from mail-lf0-x235.google.com (mail-lf0-x235.google.com [IPv6:2a00:1450:4010:c07::235]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 180F71B2BA2 for <json@ietf.org>; Thu, 4 Feb 2016 17:09:57 -0800 (PST)
Received: by mail-lf0-x235.google.com with SMTP id j78so47839328lfb.1 for <json@ietf.org>; Thu, 04 Feb 2016 17:09:56 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=BNH/hnN0TnRcAR6DRcvLHLSnEEq+xtVAzxBKzTm+Xl0=; b=jmKarLewHbJZ/vLgitwee1PS9K4GbjiFuvekkjnBH/PlT+EDLM5oM7jKGNRdMDge0G d08HLRk6req6dQCV3aRtE7vVChRlX1T0aT/IAhM2waQacCWNfaOXTNcXlVLIoKNMYmB9 54T0ZJWEW3FLm/6ugPQR2mPEu7WVh/NxNkDM7s6FftQy9H8WlwS1O050QnKsYff4ZcgL Vtw+mpEwscG8dYpWKyLftHqeBxRGn47tFp2t41MywmmPyQrfhULiJ5p8aj/97yC+NwAy R0YdPCzExL1f5YJKkHJG6yn5l4TPiuxyN9H80lhBOnBB9vkaJgGUqPFYp6dpYs9GB6+t gU6w==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=BNH/hnN0TnRcAR6DRcvLHLSnEEq+xtVAzxBKzTm+Xl0=; b=UCwy0HbFi3HymuTXS7JhSqCtC1w3MkzPTAbWVpdAZ88KGs8BwLred8vR/tEPyttldC RafoEjVQpQd9THHeCEcCAgM55LadijlQGyv1AE/Enxy6MG17MeF22UdAPhs/hp8aHxYR x6Da7ixbLFpLoimv8GgPmSpvHYf5t4SPusTFQn8NCo6pQJhInNn753yy4cG60gHK6zlB TrBeNbovJtt823gpEgTyYsu1bpVztEt9uTGThZLESoOgAo3mN5bn4aFbd4RtZfA46/B4 rJRSg8IaBYsEG3iXHsZnBX8zyW+aDCqIz5NS9kutwYybkRfmKyvuVuZiWZNSb+b2qnSI 6SjA==
X-Gm-Message-State: AG10YORz2pIJ24KO11L3mzmzdZ1bSDogAt3dnI4Ai/FC0/gFvUFDcicl4IP7ykL5LreyOJNxZqyR1EUnr3AGKw==
MIME-Version: 1.0
X-Received: by 10.25.156.198 with SMTP id f189mr4777925lfe.70.1454634595299; Thu, 04 Feb 2016 17:09:55 -0800 (PST)
Sender: hallam@gmail.com
Received: by 10.112.49.80 with HTTP; Thu, 4 Feb 2016 17:09:55 -0800 (PST)
In-Reply-To: <20160205001717.GC2997@mercury.ccil.org>
References: <CAMm+LwirhVcmUkdfyA3WKe_W747JTWNF1Ht2Nr8NJdDxOFCJOw@mail.gmail.com> <56B36D15.1030306@gmail.com> <56B370A1.1050508@tzi.org> <56B373B8.7040305@gmail.com> <20160205001717.GC2997@mercury.ccil.org>
Date: Thu, 04 Feb 2016 20:09:55 -0500
X-Google-Sender-Auth: vFIRpeyZUfqZm3MuQ85k-xwmuBk
Message-ID: <CAMm+Lwg4iqKtUjX+gw2zMu6A-fRc7_MRT14R3n670gBzMtdP9Q@mail.gmail.com>
From: Phillip Hallam-Baker <phill@hallambaker.com>
To: John Cowan <cowan@mercury.ccil.org>
Content-Type: text/plain; charset="UTF-8"
Archived-At: <http://mailarchive.ietf.org/arch/msg/json/TBNmojFipNwpXtYpchTLY3oZ1zo>
Cc: Carsten Bormann <cabo@tzi.org>, JSON WG <json@ietf.org>, Anders Rundgren <anders.rundgren.net@gmail.com>
Subject: Re: [Json] On flat vs nested JSON encoding style
X-BeenThere: json@ietf.org
X-Mailman-Version: 2.1.15
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: <https://mailarchive.ietf.org/arch/browse/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: Fri, 05 Feb 2016 01:09:58 -0000

On Thu, Feb 4, 2016 at 7:17 PM, John Cowan <cowan@mercury.ccil.org> wrote:
> Anders Rundgren scripsit:
>
>> This ecosystem is rapidly diminishing since ECMAScript nowadays mandates
>> strict insertion/declaration order for serialization.
>
> That affects only ECMAscript implementations, though, so there are no such
> guarantees on the server side, or server-to-server, unless Node.js or
> something similar is being used.

+1

We are doing RFC7159 JSON. Order is not guaranteed. A sender can emit
the request in any order they like. Code that depends on the order of
elements within an object is broken.