Re: [Json] Allow any JSON value at the top level

"Martin J. Dürst" <> Wed, 12 June 2013 01:25 UTC

Return-Path: <>
Received: from localhost (localhost []) by (Postfix) with ESMTP id 7CE3C21F9AD1 for <>; Tue, 11 Jun 2013 18:25:58 -0700 (PDT)
X-Virus-Scanned: amavisd-new at
X-Spam-Flag: NO
X-Spam-Score: -103.568
X-Spam-Status: No, score=-103.568 tagged_above=-999 required=5 tests=[AWL=0.222, BAYES_00=-2.599, HELO_EQ_JP=1.244, HOST_EQ_JP=1.265, MIME_8BIT_HEADER=0.3, RCVD_IN_DNSWL_MED=-4, USER_IN_WHITELIST=-100]
Received: from ([]) by localhost ( []) (amavisd-new, port 10024) with ESMTP id JIU6Tp5SuooN for <>; Tue, 11 Jun 2013 18:25:51 -0700 (PDT)
Received: from ( []) by (Postfix) with ESMTP id 82B7021F9AE1 for <>; Tue, 11 Jun 2013 18:25:50 -0700 (PDT)
Received: from ([]) by (secret/secret) with SMTP id r5C1PlEG006865; Wed, 12 Jun 2013 10:25:47 +0900
Received: from (unknown []) by with smtp id 30bc_9c5f_0267f670_d2ff_11e2_80c1_001e6722eec2; Wed, 12 Jun 2013 10:25:46 +0900
Received: from [IPv6:::1] (unknown []) by (Postfix) with ESMTP id 79FDAC00D8; Wed, 12 Jun 2013 10:24:34 +0900 (JST)
Message-ID: <>
Date: Wed, 12 Jun 2013 10:25:35 +0900
From: =?UTF-8?B?Ik1hcnRpbiBKLiBEw7xyc3Qi?= <>
Organization: Aoyama Gakuin University
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv: Gecko/20100722 Eudora/3.0.4
MIME-Version: 1.0
To: Tatu Saloranta <>
References: <> <> <> <> <>
In-Reply-To: <>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Cc: Carsten Bormann <>, "Manger, James H" <>, "" <>
Subject: Re: [Json] Allow any JSON value at the top level
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: Wed, 12 Jun 2013 01:25:58 -0000

On 2013/06/12 3:41, Tatu Saloranta wrote:
> On Tue, Jun 11, 2013 at 2:25 AM, Carsten Bormann<>  wrote:

>> This is irrelevant in practice as JSON is used with UTF-8 in practice.
> My main concern is with UTF-16. My understanding is that for "Big 5"
> languages its use make sense, from efficiency perspective. I do not have
> data on this; in XML space document test sets had non-trivial amount of
> content in various encodings.
> If UTF-16 is not widely used then I can see why this would be considered of
> little significance.

There are a lot of scripts (and therefore languages) where a character 
takes 3 bytes in UTF-8 but only 2 bytes in UTF-16. In particular, this 
includes all the languages of East/South East/South Asia, a huge area 
with a huge population. It's the reason why UTF-16 was made mandatory 
for XML.

However, as predicted by some, and widely confirmed in practice, most 
actual data (including XML and of course JSON) contains a significant 
amount of characters from the ASCII repertoire (syntax such as []{}"", 
and space for JSON, plus many if not most names and many values). These 
characters take only one byte in UTF-8, but two bytes in UTF-16. As a 
result, content is very often shorter in UTF-8, and when it happens to 
be longer, it's usually not much longer.

Overall, the advantage of occasionally shorter data is clearly 
outweighted by the simplicity of a single encoding (even if not on the 
receiver side, then on the generating side).

As a result, virtually the whole Web ecosystem is moving towards using 
UTF-8 only for public interchange, at a surprising speed. (Of course, 
many other encodings will still remain for years, but in lower and lower 

Regards,   Martin.