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

Anders Rundgren <> Fri, 05 February 2016 06:23 UTC

Return-Path: <>
Received: from localhost ( []) by (Postfix) with ESMTP id C62D01B3658 for <>; Thu, 4 Feb 2016 22:23:35 -0800 (PST)
X-Virus-Scanned: amavisd-new at
X-Spam-Flag: NO
X-Spam-Score: -2
X-Spam-Status: No, score=-2 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, SPF_PASS=-0.001] autolearn=ham
Received: from ([]) by localhost ( []) (amavisd-new, port 10024) with ESMTP id dzpzIGWi6DT9 for <>; Thu, 4 Feb 2016 22:23:34 -0800 (PST)
Received: from ( [IPv6:2a00:1450:400c:c09::236]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by (Postfix) with ESMTPS id EE92C1B3657 for <>; Thu, 4 Feb 2016 22:23:33 -0800 (PST)
Received: by with SMTP id 128so56956021wmz.1 for <>; Thu, 04 Feb 2016 22:23:33 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;; s=20120113; h=subject:to:references:cc:from:message-id:date:user-agent :mime-version:in-reply-to:content-type:content-transfer-encoding; bh=pfQ47WiLLw2qa0Tn254nf9RkUhbJ91vEixroqLpwJns=; b=XikGoraWVAajBB4bspsRyG+7oYD8M85nJUF68pvMrm2X/z9jVW995SKk4oo62xpQEM VYkU5utBy6sRshJj6K9m+UgAcwe6D4rayjiuFCXD9uGGi/ijxVQp4UDj4JtOdW0slboO sy4fWSLqLI0mTwFIGBYpIzI7uBX+EFK9y7kGMZ+t8X/QOi10p8NapkZiiL0odvYnKq// 54B/KRyvYTCRUj/39xRBuFOPXbCjXcooqHzxaJnBeSwwsjjAhp9Eeib0tqZ+8N8Jv83X kUYet0O1wgMPUSnxO0T/r8+spiu3XQn8xlOy2/J6FzCDjhB7+Fm8iD5TPR+SbUUTMi5h 4k/A==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;; s=20130820; h=x-gm-message-state:subject:to:references:cc:from:message-id:date :user-agent:mime-version:in-reply-to:content-type :content-transfer-encoding; bh=pfQ47WiLLw2qa0Tn254nf9RkUhbJ91vEixroqLpwJns=; b=BTXwKem8BcczyRghhZdFKWOS7h4FA3dB3+SYZeVbUXTyxQ9QRMeaIRlxU3bcxaxK4C vng3EpDIluozaLFsMa5efnfw20o8Z1hdKrhj78/Bd8Y4tJLZeFrBrAuNQQ69uLzhxkB3 N1ZizjfcMfdgr+XR5Kc7FMRKzMyfLDAUqve2RARolxqajJPYZPP3FSD9zOHnnb+Urt4e BtCNsWecE8Tk3I8iKH0FCx5OeRuhqIHH1wAtULswb92lRUcscIlbMXaWCp0E9kHQ6VVt /0TMgvuZTvy12PucInsdlUrs3NUG2ExhsfomImp4T6dE4WqNsOCjwN+4BvF9X0N732Su 9edA==
X-Gm-Message-State: AG10YOTKus7mg3NnnncaZqXadIoNoq4VkiugiY17m/jSkzVXSgabc3TTn/uQ5FOYMjztvw==
X-Received: by with SMTP id u5mr14076174wje.53.1454653412569; Thu, 04 Feb 2016 22:23:32 -0800 (PST)
Received: from [] ( []) by with ESMTPSA id w136sm29394100wmw.0.2016. (version=TLSv1/SSLv3 cipher=OTHER); Thu, 04 Feb 2016 22:23:31 -0800 (PST)
To: Phillip Hallam-Baker <>, John Cowan <>
References: <> <> <> <> <> <>
From: Anders Rundgren <>
Message-ID: <>
Date: Fri, 5 Feb 2016 07:23:10 +0100
User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.5.1
MIME-Version: 1.0
In-Reply-To: <>
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 7bit
Archived-At: <>
Cc: Carsten Bormann <>, JSON WG <>
Subject: Re: [Json] On flat vs nested JSON encoding style
X-Mailman-Version: 2.1.15
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, 05 Feb 2016 06:23:35 -0000

On 2016-02-05 02:09, Phillip Hallam-Baker wrote:
> On Thu, Feb 4, 2016 at 7:17 PM, John Cowan <> 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.

Well, the W3C Web Payment IG/WG folks who claim they are working with
a new (and presumable secure) system for the Web Payments have not yet
begun dealing with how they are going to sign their JSON messages.

This will be a litmus test, not for RFC7159, but for RFC7515:

In the meantime, I'm helping JSON tool-vendors providing support for
"Predictable Serialization" a la ES6/V8.  With the sole exception of
"Number", this is not rocket science and that particular rocket has already
been built by Google and the blueprints are readily available as well.

Maybe we can come back to this issue in 18 months and see where it went?